Installing Ansible AWX on a Kubernetes Cluster Using Helm

Installing Ansible AWX on a Kubernetes Cluster Using Helm

Deploying Ansible AWX on your Kubernetes cluster is simplified using Helm. Here's a concise guide to deploy AWX and have your web interface operational:

1. Setting Up the AWX Helm Chart:

  • Add the AWX Helm chart repository:
helm repo add awx-operator https://ansible.github.io/awx-operator/
  • Update your Helm chart repository to get the latest versions:
helm repo update

2. Installing the AWX Chart:

  • Install the AWX Helm chart in the specified namespace:
helm install -n awx --create-namespace awx awx-operator/awx-operator

3. Verifying the AWX Operator Status:

  • Check to ensure all components are running as expected:
kubectl get pods -n awx

4. Preparing for AWX Deployment:

  • Define the AWX instance specifications before deployment:
  • Edit the configuration file:
$ vi ansible-awx.yaml
  • Insert the configuration details:
---
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
  name: ansible-awx
  namespace: awx
spec:
  service_type: LoadBalancer
  postgres_storage_class: default

5. Deploying the AWX Instance:

  • Deploy the AWX instance with the provided configurations:
kubectl apply -f ansible-awx.yaml

6. Determine the access details for the web service:

  • after a few seconds, a new awx service will be exposed to port 8055 with type Load Balancer.
kubectl get svc ansible-awx-service -n awx
  • Change the deployment to use custom port 8055 for example
kubectl patch service ansible-awx-service -n awx --type='json' -p='[{"op": "replace", "path": "/spec/ports/0/port", "value": 8055}]'

7. Logging into AWX Interface:

  • Retrieve the admin password required to access the AWX interface:
kubectl get secret -n awx ansible-awx-admin-password -o jsonpath="{.data.password}" | base64 --decode

With the above steps completed, your Ansible AWX instance should be live on your Kubernetes cluster. Dive in and commence your automation journey! Remember to consult the official documentation for in-depth configurations and potential troubleshooting. Happy automating!