What should hostpath path be written?

I want to load an external configuration file

spec:
containers:
volumeMounts:
- name: apm-server-config
mountPath: /usr/share/apm-server/apm-server.yml
readOnly: true
subPath: apm-server.yml
- name: data
mountPath: /usr/share/apm-server/data
volumes:
- name: data
emptyDir: {}
- name: apm-server-config
hostPath:
path: apm-server.yml

kubelet warning
Warning Failed 16s (x6 over 22s) kubelet, 192.168.51.212 Error: stat apm-server.yml: no such file or directory

volumes:
- name: data
emptyDir: {}
- name: apm-server-config
hostPath:
path: apm-server.yml
type: File

kubelet warning

MountVolume.SetUp failed for volume “apm-server-config” : hostPath type check failed: /home/charts/stable/apm-server/apm-server.yml is not a file