logo

Install AWX to Kubernetes

The following posts describes some gotchas/ experiences I have while installing AWX to a kubernetes Cluster. The official AWX documentation (in my opinion) is not friendly to newcomers and assumes you have domain knowledge on the target platform you plan to install it on – and even then some items are not clearly defined. See for yourself here:

https://github.com/ansible/awx/blob/devel/INSTALL.md

Things to consider

  • Ansible Version

It’s recommended to use the latest version of ansible when executing the playbook. I’ve tried with the following version – 2.5.x running in Linuxmint and 2.7.x running in WSL and the version the playbook work is at 2.9.6 running in Ubuntu 18.04.

Otherwise the following error -you’ll be getting: “offending line”

  • In the inventory file, for kubernetes, specify the cluster where you’ll be installing awx

The label on the inventory file is context, which actually just pertains to the cluster specified in the kube config file. To get which cluster you can install type

kubectl config get-contexts

Get the cluster name and not the context

  • Be wary of the limits and requests on the pods.

AWX is resource hungry – atleast what was defined in the definition. You need to make sure to adjust the request and limits for each of the pods, otherwise, you’ll be encountering the bellow error:

Upon closer inspection of the Pending pod, you’ll see it complaining its not getting resource.

To get around this for people who just want it running in kubernetes, adjust the default request and limits. In my case, I made the following changes:

Defaults:

web_mem_request: 0
web_cpu_request: 0
redis_mem_request: 0
redis_cpu_request: 0
task_mem_request: 0
task_cpu_request: 0

/root/awx-full/awx/installer/roles/kubernetes/defaults/main.yml

And that’s it.. after executing the playbook -adjusting the ingress (i’m using traefik) – you should be good to go. 🙂

Leave a Reply

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.