AWX HA on Kubernetes

Hi All,

Hope you are doing well.

We are trying to setup AWX on Kubernetes. There are 3 problems that are we are stuck at:

1. We are trying to create 3 replicas of awx pods by making changes in the awx repo but only single pod gets created.

root@ubuntu-master:/awx/installer# kubectl get pods
NAME READY STATUS RESTARTS AGE
awx-0 4/4 Running 0 2m45s
awx-postgresql-postgresql-0 1/1 Running 0 3m47s

I have changed the number of replicas in deployment.yml.j2 to 3

Path : /awx/installer/roles/kubernetes/templates/deployment.yml.j2

line 30 : replicas: 3

Also I have changed the size of replica in main.yaml to 3

Path : installer/roles/kubernetes/defaults/main.yml

line 42 : kubernetes_deployment_replica_size: 3

After making these changes. when I run the ansible palybook, only single pod awx get created instead of 3…How to fix this?

2. We are unable to get the ingress address

NAME HOSTS ADDRESS PORTS AGE
awx-web-svc * 80 4d1h

the address for ingress comes blank after the awx deployment…How to fix this?

  1. We want to know how to uninstall the complete deployment(awx and associated pods) if we need to re-install awx because everytime when I want to re-install awx, I am just running the ansible-playbook on the previous deployment itself…please advise

We need your guidance on above problems…Kindly suggest

Thanks,
Sanchit

Hello,

The Kubernetes installer sets the number of statefulset replicas with the value of the kubernetes_deployment_replica_size (default: 1)
You can set the desired value in your inventory and it should scale at the end of the installation.
Of course, you can manually scale the statefulset using kubectl scale --replicas=X statefulset awx -n <awx_namespace>

The ingress address depends on the kubernetes_ingress_hostname value, do you have it in your inventory?
To see exactly what is being deployed, check the installer/roles/kubernetes/templates/deployment.yml.j2 file in the awx repository.

Oh, and to do a clean installation I’m assuming you are using a specific namespace for AWX, simply delete that namespace in Kubernetes.