Create a Ubuntu Virtual Machine with:32 GB RAM8 cores120 GB HD
Step-by-step: Install AWX 24.6.1 on Minikube (Ubuntu)
🔧 1. System Preparation
1$ sudo apt update && sudo apt upgrade -y
2$ sudo apt install -y curl wget apt-transport-https ca-certificates gnupg lsb-release software-properties-common
3$ sudo timedatectl set-timezone Europe/Amsterdam
📦 2. Install Docker (Minikube backend)
1$ curl -fsSL https://get.docker.com | sudo bash
2$ sudo usermod -aG docker $USER
3$ newgrp docker # Activate group without reboot
4
5Enable and start Docker:
6$ sudo systemctl enable docker
7$ sudo systemctl start docker
8
9Test:
10$ docker run hello-world
🧱 3. Install Minikube
1$ curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
2$ sudo install minikube-linux-amd64 /usr/local/bin/minikube
3
4Test:
5$ minikube version
⚙️ 4. Install kubectl (Kubernetes CLI)
1$ curl -LO "https://dl.k8s.io/release/$(curl -Ls https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
2$ sudo install kubectl /usr/local/bin/kubectl
3
4Test:
5$ kubectl version --client
🚀 5. Start Minikube
1$ minikube start --cpus=4 --memory=8192 --driver=docker
2
3Optional: Set as default
4$ minikube config set memory 8192
5$ minikube config set cpus 4
6$ minikube config set driver docker
📁 6. Install AWX Operator (matching 24.6.1)
1$ git clone https://github.com/ansible/awx-operator.git
2$ cd awx-operator
3$ git checkout 2.14.0 # Matches AWX 24.6.1
4
5Install required tools:
6$ sudo apt install -y make
7
8Install the operator:
9$ make deploy
10
11Verify:
12$ kubectl get pods -n awx
📄 7. Create AWX Instance (CR)
Create a file awx.yaml:
1apiVersion: awx.ansible.com/v1beta1
2kind: AWX
3metadata:
4 name: awx
5spec:
6 service_type: nodeport
7 ingress_type: none
8 image: quay.io/ansible/awx
9 image_version: 24.6.1
10 postgres_storage_class: standard
11 postgres_resource_requirements:
12 requests:
13 memory: 512Mi
14 cpu: 250m
15 limits:
16 memory: 1Gi
17 cpu: 500m
18 web_resource_requirements:
19 requests:
20 memory: 512Mi
21 cpu: 250m
22 limits:
23 memory: 2Gi
24 cpu: 1
25
26Then apply it:
27$ kubectl apply -f awx.yaml -n awe
28
29Watch deployment:
30$ kubectl get awx -n awx
31$ kubectl get pods -n awx -w
32
33$ kubectl get svc -n awx
🌐 8. Access AWX Web UI
1Get the NodePort:
2$ kubectl get svc -n awx | grep awx-service
3
4Example output:
5awx-service NodePort 10.0.0.94 <none> 8052:30437/TCP 5m
6awx-service NodePort 10.98.159.10 <none> 80:30153/TCP 5m29s
7
8Then:
9$ minikube ip
10
11Get NodePort:
12$ kubectl get svc awx-service -n awx -o yaml
13
14$ minikube service awx-service -n awx
15
16Or open in browser:
17http://<your-server-ip>:<NodePort>
18http://192.168.49.2:30153/
🔐 9. Login credentials Get admin password:
1$ kubectl get secret awx-admin-password -n awx -o jsonpath="{.data.password}" | base64 --decode && echo
2* Username: admin
3* Password: output from above
🧼 10. (Optional) Enable Minikube dashboard Kubernetes Dashboard
1$ minikube dashboard
Step-by-Step: Auto-start AWX on Minikube after Reboot
🔁 1. Enable Docker to start at boot
1$ sudo systemctl enable docker
🚀 2. Create a systemd service to auto-start Minikube Create a new systemd unit:
1$ sudo vim /etc/systemd/system/minikube.service
2Paste this:
3
4[Unit]
5Description=Minikube K8s Cluster
6After=docker.service
7Requires=docker.service
8
9[Service]
10Type=oneshot
11ExecStart=/usr/local/bin/minikube start --driver=docker
12RemainAfterExit=yes
13User=your-username
14Environment=HOME=/home/your-username
15WorkingDirectory=/home/your-username
16
17[Install]
18WantedBy=multi-user.target
19
20🔧 Replace your-username with your actual Linux username.
21
22Save and run:
23$ sudo systemctl daemon-reexec
24$ sudo systemctl daemon-reload
25$ sudo systemctl enable minikube.service
26
27Test it manually:
28$ sudo systemctl start minikube.service
29
30$ kubectl get pods -n awx -w
31NAME READY STATUS RESTARTS AGE
32awx-migration-24.6.1-pn969 0/1 Completed 0 21m
33awx-operator-controller-manager-68699bb54-pscct 2/2 Running 2 (64s ago) 68m
34awx-postgres-15-0 1/1 Running 1 (58s ago) 26m
35awx-task-86d87f596c-xm8wx 4/4 Running 4 (62s ago) 25m
36awx-web-7c76dcb5b8-ctmrf 3/3 Running 3 (54s ago) 25m
🛠️ 3. Ensure AWX Operator and AWX pods auto-recover Kubernetes handles pod recovery automatically. As long as Minikube starts correctly and the AWX Operator was deployed with: make deploy …it will recreate your AWX custom resource and pods on reboot. You can confirm with:
1$ kubectl get pods -n awx
🌐 4. Make NodePort consistent (optional) Kubernetes assigns a random NodePort unless you explicitly set it. To make access reliable:
1$ kubectl patch svc awx-service -n awx --type='json' -p='[
2 {"op": "replace", "path": "/spec/type", "value":"NodePort"},
3 {"op": "replace", "path": "/spec/selector", "value":{
4 "app.kubernetes.io/component": "awx",
5 "app.kubernetes.io/managed-by": "awx-operator",
6 "app.kubernetes.io/name": "awx-web"
7 }},
8 {"op": "replace", "path": "/spec/ports/0/nodePort", "value":31082}
9]'
10
11
12$ vim awx-nodeport-service.yaml
13
14apiVersion: v1
15kind: Service
16metadata:
17 name: awx-service
18 namespace: awx
19spec:
20 type: NodePort
21 selector:
22 app: awx # Make sure this matches your pod labels
23 ports:
24 - protocol: TCP
25 port: 80 # Service port inside the cluster
26 targetPort: 8052 # Port your pod/container listens on
27 nodePort: 31082 # The static NodePort you want to assign
28
29Re-apply:
30$ kubectl apply -f awx-nodeport-service.yaml
31
32Then your UI is always at:
33http://<server-ip>:31082
🧪 5. Verify after reboot Reboot the server:
1$ sudo reboot
2
3After boot:
4$ minikube status
5$ kubectl get pods -n awx
Check UI:
1$ minikube ip
2http://<your-server-ip>:31082
Comments