awx k8 - Postgres pod deploy failed getting CreateContainerConfigError

Hello all,

I’m trying to install a new and latest install of AWX in K8, but the postgres pod never gets created, it errored out saying : CreateContainerConfigError. Below are some command outputs.
Please let me know what is causing the problem.I do see pv and pvc bound also i have created /data/postgres and /data/projects. I have changed permission on those dire as well

Hi,

Since you are on multi-noded cluster, you should use some sort of shared storage for your PV (like iSCSI, NFS, Ceph, Longhorn, GlusterFS…).

The hostPath based PV that you’re using does not magically allow you to share your local directory between nodes, it only mounts that directory when the Pod is scheduled on exactly that node.
I mean, even if you create /data/postgres on k8-ctrlr, it cannot be referenced and mounted from k8-node-1/2/3.

https://kubernetes.io/docs/concepts/storage/volumes/#hostpath

https://kubernetes.io/docs/concepts/storage/persistent-volumes/#types-of-persistent-volumes

Creating /data/postgres on all nodes of k8-node-1/2/3 will work, but its contents (files inside the directory) will never be synchronized between nodes, so the data that PSQL will read will change depending on the node where the pod is launched. So hostPath based PV is impractical on multi-noded cluster unless the node where the pod runs are explicitly fixed.

Regards,

Thank you Kurokobo. creating /data/** in worker nodes fixed the container issue, but I will go ahead and change to NFS as my cluster is multinode.