Accessing Containers on AWX

Share this post on:

If you have installed one of our AWX pre-built images, you might occassionally want to look under the hood for troubleshooting.

AWX is an open source community project, sponsored by Red Hat, that enables users to better control their community Ansible project use in IT environments. AWX is the upstream project from which the Ansible Automation Controller component from RedHat is ultimately derived.

If you want to get started with our prebuilt images, we have them on your favourite cloud already. Choose your cloud below to get started. The rest of the article assumes you have access to a system with AWX installed.

Since version 18, AWX runs on Kubernetes and if you have prior Kubernetes experience, this should be a breeze. Prior versions of AWX run on native docker. In that case, docker management tools will come in handy.

Lets see the pods.

To start off, we list the pods in the AWX cluster

kubectl get pods

Your output might look like this

From the list above, we have 2 pods, the PostgreSQL pod and the AWX-Deployment Pod. The AWX-Deployment pod has 4 containers, if we need to access any of the individual containers, we need to get their actual names.

kubectl get pods [podname]

for example

kubectl get pods awx-deployment-958b5b45c-cx9st -o jsonpath='{.spec.containers[*].name}'

Sample output would look like this

From the list, we have the 4 pods, namely awx-web, awx-task, awx-ee, redis

We can now safely, run exec to access any of them

kubectl exec -it [podname] -c [container name] [command inside container]

In this case;

kubectl exec -it awx-deployment-958b5b45c-cx9st -c awx-web bash

That’s all folks.

Do you still need help?

Look, our Tech Support Staff live and breathe Cloud Engineering. Let them handle the details, so you can focus on the big picture.

Contact Support

Share this post on: