# AWX HA on Kubernetes

**URL:** <https://forum.ansible.com/t/awx-ha-on-kubernetes/32516>\
**Category:** AWX Project\
**Tags:** ubuntu, awx, kubernetes\
**Created:** [March 23, 2020, 8:03pm UTC](https://forum.ansible.com/t/awx-ha-on-kubernetes/32516 "2020-03-23T20:03:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SANCHIT\_KHANDELWAL](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@SANCHIT\_KHANDELWAL](https://forum.ansible.com/u/SANCHIT_KHANDELWAL)\
**Post date:** [March 23, 2020, 8:03pm UTC](https://forum.ansible.com/t/awx-ha-on-kubernetes/32516/1 "2020-03-23T20:03:03Z")

</div>

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**

l **ine 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

---

<div class="post-metadata">

**Author:** ![sdmorel](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@sdmorel](https://forum.ansible.com/u/sdmorel)\
**Post date:** [April 6, 2020, 8:37am UTC](https://forum.ansible.com/t/awx-ha-on-kubernetes/32516/2 "2020-04-06T08:37:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sdmorel](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@sdmorel](https://forum.ansible.com/u/sdmorel)\
**Post date:** [April 6, 2020, 8:44am UTC](https://forum.ansible.com/t/awx-ha-on-kubernetes/32516/3 "2020-04-06T08:44:55Z")

</div>

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