I am receiving the following error when working with awx operator 2.19.1, K3s v1.29.6+k3s2, AWX 24.6.1, postgresql 15. ,
kubectl get po -n awx
NAME READY STATUS RESTARTS AGE
awx-operator-controller-manager-58b7c97f4b-nbvd8 2/2 Running 0 40h
awx-postgres-15-0 0/1 Init:CreateContainerConfigError 0 40h
kubectl -n awx logs -f statefulset/awx-postgres-15 -c init
Error from server (BadRequest): container “init” in pod “awx-postgres-15-0” is waiting to start: CreateContainerConfigError
kubectl -n awx logs -f statefulset/awx-postgres-15
Defaulted container “postgres” out of: postgres, init (init)
Error from server (BadRequest): container “postgres” in pod “awx-postgres-15-0” is waiting to start: PodInitializing
The pv and pvc appear to be bound:
kubectl get pv
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS VOLUMEATTRIBUTESCLASS REASON AGE
awx-postgres-15-volume 8Gi RWO Retain Bound awx/postgres-15-awx-postgres-15-0 awx-postgres-volume 41h
awx-projects-volume 2Gi RWO Retain Bound awx/awx-projects-claim awx-projects-volume
I believe this is related to the directions of:
sudo mkdir -p /data/postgres-15
sudo mkdir -p /data/projects
sudo chown 1000:0 /data/projects
Where do these directories need to be created? At / on the server itself, inside /var/lib on the server, inside the directory where the installation is? Or is this done inside a container, or is this inside some other piece of software that is part of the installation?
As I am very new to the whole docker, kubernetes, minikube setup for AWX, I have done the 3 machine install on virtual machines before but not inside all this software, my apologies if this is a very basic question that may have been answered all ready.
TIA!
Danielle
kubectl describe po/awx-postgres-15-0 -n awx
Name: awx-postgres-15-0
Namespace: awx
Priority: 0
Service Account: default
Node: minikube/192.168.49.2
Start Time: Tue, 03 Jun 2025 16:11:12 -0400
Labels: app.kubernetes.io/component=database
app.kubernetes.io/instance=postgres-15-awx
app.kubernetes.io/managed-by=awx-operator
app.kubernetes.io/name=postgres-15
app.kubernetes.io/part-of=awx
apps.kubernetes.io/pod-index=0
controller-revision-hash=awx-postgres-15-5d69bb47df
statefulset.kubernetes.io/pod-name=awx-postgres-15-0
Annotations:
Status: Pending
IP: 10.244.0.5
IPs:
IP: 10.244.0.5
Controlled By: StatefulSet/awx-postgres-15
Init Containers:
init:
Container ID:
Image: Quay
Image ID:
Port:
Host Port:
Command:
/bin/sh
-c
chown 26:0 /var/lib/pgsql/data
chmod 700 /var/lib/pgsql/data
State: Waiting
Reason: CreateContainerConfigError
Ready: False
Restart Count: 0
Environment: <none>
Mounts:
/var/lib/pgsql/data from postgres-15 (rw,path="data")
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-xrdp8 (ro)
Containers:
postgres:
Container ID:
Image: Quay
Image ID:
Port: 5432/TCP
Host Port: 0/TCP
State: Waiting
Reason: PodInitializing
Ready: False
Restart Count: 0
Environment:
POSTGRESQL_DATABASE: <set to the key ‘database’ in secret ‘awx-postgres-configuration’> Optional: false
POSTGRESQL_USER: <set to the key ‘username’ in secret ‘awx-postgres-configuration’> Optional: false
POSTGRESQL_PASSWORD: <set to the key ‘password’ in secret ‘awx-postgres-configuration’> Optional: false
POSTGRES_DB: <set to the key ‘database’ in secret ‘awx-postgres-configuration’> Optional: false
POSTGRES_USER: <set to the key ‘username’ in secret ‘awx-postgres-configuration’> Optional: false
POSTGRES_PASSWORD: <set to the key ‘password’ in secret ‘awx-postgres-configuration’> Optional: false
PGDATA: /var/lib/pgsql/data/userdata
POSTGRES_INITDB_ARGS: --auth-host=scram-sha-256
POSTGRES_HOST_AUTH_METHOD: scram-sha-256
Mounts:
/var/lib/pgsql/data from postgres-15 (rw,path=“data”)
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-xrdp8 (ro)
Conditions:
Type Status
PodReadyToStartContainers True
Initialized False
Ready False
ContainersReady False
PodScheduled True
Volumes:
postgres-15:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: postgres-15-awx-postgres-15-0
ReadOnly: false
kube-api-access-xrdp8:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
Optional: false
DownwardAPI: true
QoS Class: BestEffort
Node-Selectors:
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
Type Reason Age From Message
Warning Failed 88s (x11255 over 40h) kubelet Error: stat /data/postgres-15: no such file or directory
Normal Pulled 88s (x11254 over 40h) kubelet Container image “Quay” already present on machine