# Best Approach for Implementing AWX in Production: Docker vs. Kubernetes?

**URL:** <https://forum.ansible.com/t/best-approach-for-implementing-awx-in-production-docker-vs-kubernetes/3024>\
**Category:** Get Help\
**Tags:** awx, collections, kubernetes\
**Created:** [December 21, 2023, 11:46am UTC](https://forum.ansible.com/t/best-approach-for-implementing-awx-in-production-docker-vs-kubernetes/3024 "2023-12-21T11:46:45Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![tom1](https://avatars.discourse-cdn.com/v4/letter/t/b487fb/32.png) [@tom1](https://forum.ansible.com/u/tom1)\
**Post date:** [December 21, 2023, 11:46am UTC](https://forum.ansible.com/t/best-approach-for-implementing-awx-in-production-docker-vs-kubernetes/3024/1 "2023-12-21T11:46:45Z")

</div>

Hello,  
I have a query regarding implementing AWX on Red Hat 9. My goal is to establish two control nodes and three execution nodes on a machine. I’m considering two deployment methods:

- Running AWX in Docker.
- Deploying AWX in a Kubernetes cluster using the awx-operator, following the instructions provided in the link below:

[https://ansible.readthedocs.io/projects/awx-operator/en/latest/installation/basic-install.html](https://ansible.readthedocs.io/projects/awx-operator/en/latest/installation/basic-install.html)

Which approach would you recommend or are there any other recommended or superior ways to implement AWX in a production environment that you would suggest considering?

---

<div class="post-metadata">

**Author:** ![kurokobo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kurokobo/32/182_2.png) [@kurokobo](https://forum.ansible.com/u/kurokobo)\
**Post date:** [December 21, 2023, 12:25pm UTC](https://forum.ansible.com/t/best-approach-for-implementing-awx-in-production-docker-vs-kubernetes/3024/2 "2023-12-21T12:25:57Z")

</div>

Hi, the install guide for AWX may help you:

> Starting in version 18.0, the [AWX Operator](https://github.com/ansible/awx-operator) is the preferred way to install AWX.  
> [awx/INSTALL.md at devel · ansible/awx · GitHub](https://github.com/ansible/awx/blob/devel/INSTALL.md)

> AWX can also alternatively be installed and [run in Docker](https://github.com/ansible/awx/blob/devel/tools/docker-compose/README.md), but this install path is only recommended for development/test-oriented deployments, and has no official published release.  
> [awx/INSTALL.md at devel · ansible/awx · GitHub](https://github.com/ansible/awx/blob/devel/INSTALL.md)

---

<div class="post-metadata">

**Author:** ![tom1](https://avatars.discourse-cdn.com/v4/letter/t/b487fb/32.png) [@tom1](https://forum.ansible.com/u/tom1)\
**Post date:** [December 21, 2023, 1:51pm UTC](https://forum.ansible.com/t/best-approach-for-implementing-awx-in-production-docker-vs-kubernetes/3024/3 "2023-12-21T13:51:52Z")

</div>

Hello, thank you for your response.  
I have already read the installation guide in the AWX GitHub repository. However, I am uncertain which approach would be best for my scenario. As you mentioned, the installation guide suggests running AWX in Docker, but it’s stated to be recommended primarily for development purposes. Nevertheless, some engineers do run AWX in Docker in production environments, and I’ve also noticed AWX available in the Azure Marketplace, where the AWX instance provided by Azure operates within Docker. This has left me quite perplexed about determining the ideal approach for my situation, particularly because I intend to set up multiple execution nodes. Additionally, I couldn’t find any references on how to run multiple control and execution nodes in Kubernetes, while there are several resources available for achieving this using Docker.

---

<div class="post-metadata">

**Author:** ![Klaas](https://avatars.discourse-cdn.com/v4/letter/k/ecc23a/32.png) [@Klaas](https://forum.ansible.com/u/Klaas)\
**Post date:** [December 22, 2023, 7:20am UTC](https://forum.ansible.com/t/best-approach-for-implementing-awx-in-production-docker-vs-kubernetes/3024/4 "2023-12-22T07:20:04Z")

</div>

AWX is not being offered in Azure Marketplace by the AWX devs. What you see there is just 3rd parties offering “their” installation of AWX. AWX only has one recommended way of running, kubernetes, for anything but development.  
Having said that, this is open source software, you may use it however you like as far as the license permits (for licenses see [awx/LICENSE.md at devel · ansible/awx · GitHub](https://github.com/ansible/awx/blob/devel/LICENSE.md) and [awx/licenses at devel · ansible/awx · GitHub](https://github.com/ansible/awx/tree/devel/licenses)). So if you say you want to run it in docker for production, do that, but you won’t get much help from devs/community if you do, so be prepared to solve your own issues 🙂

---

<div class="post-metadata">

**Author:** ![Klaas](https://avatars.discourse-cdn.com/v4/letter/k/ecc23a/32.png) [@Klaas](https://forum.ansible.com/u/Klaas)\
**Post date:** [December 22, 2023, 7:23am UTC](https://forum.ansible.com/t/best-approach-for-implementing-awx-in-production-docker-vs-kubernetes/3024/5 "2023-12-22T07:23:29Z")

</div>

and maybe for completeness: there is a supported way to run it via Azure Marketplace, if you buy the Red Hat product (Azure Automation Platform). If you buy that you will be also funding AWX development because most (all?) main developers work for Red Hat

---

<div class="post-metadata">

**Author:** ![tom1](https://avatars.discourse-cdn.com/v4/letter/t/b487fb/32.png) [@tom1](https://forum.ansible.com/u/tom1)\
**Post date:** [December 22, 2023, 11:03am UTC](https://forum.ansible.com/t/best-approach-for-implementing-awx-in-production-docker-vs-kubernetes/3024/7 "2023-12-22T11:03:18Z")

</div>

Thank you for your explanation.  
Do you have any references I could use to implement multiple control nodes and execution nodes? I’ve tried searching online, but I couldn’t find a suitable reference for that.

---

<div class="post-metadata">

**Author:** ![kurokobo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kurokobo/32/182_2.png) [@kurokobo](https://forum.ansible.com/u/kurokobo)\
**Post date:** [December 23, 2023, 1:34pm UTC](https://forum.ansible.com/t/best-approach-for-implementing-awx-in-production-docker-vs-kubernetes/3024/8 "2023-12-23T13:34:46Z")

</div>

Hi,

> I could use to implement multiple control nodes

You can use `task_replicas` to increase the number of the control nodes: [Scaling the web and task pods independently - Ansible AWX Operator Documentation](https://ansible.readthedocs.io/projects/awx-operator/en/latest/user-guide/advanced-configuration/scaling-the-web-and-task-pods-independently.html)

> and execution nodes

An Execution Node in AWX is an instance that runs standalone, not on a Kubernetes cluster; it can be added via the GUI and the install bundle can be downloaded: [awx/docs/execution\_nodes.md at devel · ansible/awx · GitHub](https://github.com/ansible/awx/blob/devel/docs/execution_nodes.md)

If you want to limit the job pods to specific Kubernetes nodes, you can use Container Groups with customized pod spec with `nodeAffinity`: [7. Container and Instance Groups — Ansible AWX community documentation](https://ansible.readthedocs.io/projects/awx/en/latest/administration/containers_instance_groups.html#container-groups)

Container Groups can also be used to run jobs on the different Kubernetes cluster than the cluster on which AWX runs.
