Deploying AWX With NFS Share For Postgres Volume

Hello,

I’m needing some guidance on a problem I’m having configuring an NFS share for awx. I am trying to deploy AWX using awx-operator on a microk8s cluster, hosted on Ubuntu, that will use a NFS share for the postgres volume. From my reading I have done the following.

  1. Installed the necessary CSI driver for microk8s.
  2. Created an NFS storage class.
# sc-nfs.yaml
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: nfs-csi
provisioner: nfs.csi.k8s.io
parameters:
  server: ip_address
  share: /srv/pg_share
allowVolumeExpansion: true
volumeBindingMode: Immediate
mountOptions:
  - hard
  - nfsvers=4.1
  1. Specified the NFS storage class to be used in my custom values passed to helm for deploying awx-operator.
# my_values.yaml
---
AWX:
  enabled: true
  name: awx
  spec:
    admin_user: admin
    hostname: lab.mydomain

customVolumes:
  postgres:
    enabled: true
    hostPath: /srv/pg_share
    size: 15Gi
    storageClassName: nfs-csi
  1. Again, specified the storage class for the ansible deployment. Not entirely sure that this step is necessary.
# awx-deploy.yaml
---
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
  name: awx
spec:
  service_type: nodeport

  postgres_storage_class: nfs-csi
  postgres_storage_requirements:
    requests:
      storage: 15Gi

My problem is that when I deploy awx-operator with the helm chart it doesn’t successfully create the postgres pod, and is in an Error state. Viewing the pods events I see the below failure reason.

“Back-off restarting failed container postgres in pod awx-postgres-15-0_awx(40400b95-67f0-4d86-91d6-8663e3bc671f)”

When I view the NFS folder I see the folder created by the claim, with a ‘data’ subfolder.

Any help would be greatly appreciated.