I did not get what the error log says or how to figure out it is saying the correct mount path will be nginx.config instead of conf in sol it just says change the moun path to this for other questions even I fixed the kube API server and changed the port 6443 in liveness then also me sol failed Please help m with explantion
If you’re asking about nginx, I assume you already found the initContainer error.
This error (I’ve cut out the random stuff leaving the bits you need to concentrate on)
error mounting "/var/lib/kubelet/.../nginx-config" to rootfs at "/etc/nginx/nginx.conf": mount /var/lib/kubelet/pods/./volumes/kubernetes.io~configmap/nginx-config:/etc/nginx/nginx.conf (via /proc/self/fd/6), flags: 0x5001: not a directory
not a directory
is important here
Look at the volume mount
- mountPath: /etc/nginx/nginx.conf
name: nginx-config
mountPath
is specifying the path to a file.
Look at the configmap. It contains the file nginx.conf
which needs to be mounted into a directory. Therefore the mountPath needs to be the directory in which to place the file nginx.conf
Change to
- mountPath: /etc/nginx
name: nginx-config