Skip to content

AWX minicube - recreate

re-create procedure similar trick like first time. AWX (Ansible): 3. AWX update steps after 17.0.0 - minicube (https://app.clickup.com/2496230/docs/2c5q6-69975/2c5q6-214661) I started with this command to create a new minicube profile. minikube start -p stable-cluster --kubernetes-version=v1.27.3 kubectl config use-context minikube

first create a shorcut: kubectl2="minikube kubectl --profile=stable-cluster --" * * after final setup we will create permanent alias for "kubectl" to be for the new cluster. buit for now. to have separation we will use with "$kubectl2" kubectl get nodes

minikube status -p stable-cluster


Step 1: old minicube profile. we need to create backup form the db. * minicube ssh * docker ps (find posgre db name) * docker exec -it 9ebbd8392d18 bash * g_dump -U awx -d awx > /tmp/awx_backup-ace-08-06-2025.sql * exit * docker cp 9ebbd8392d18:/tmp/awx_backup.sql ./awx_backup-ace-08-06-2025.sql * exit * scp -i $(minikube ssh) awx_backup-ace-08-06-2025.sql . the sql backup is created.


Step 2: new created minicube profile stable-cluster. setup clean awx. go to the /opt/awx-minicube-folder/ kubectl apply -k . this will recreade same data awx env we have. confirm if its up. login also to the awx. use teleport to expose to you. when you are connected nice job. we can continue to import the database.


Step 3: Prepare to import the backup. we need to clean awx db. and to create clean. $kubectl2 exec -it awx-postgres-13-0 bash -n=awx psql -U awx -d postgres DROP DATABASE awx; CREATE DATABASE awx; You get problems ? :D


Step 3.1: Prepare the nodes, turn off. (this is the magic) turn off the pods. $kubectl2 scale deployment awx-operator-controller-manager --replicas=0 -n awx $kubectl2 scale deployment awx-web --replicas=0 -n awx $kubectl2 scale deployment awx-task --replicas=0 -n awx


Step 3.2 - again try to delete awx db, and to recreate. $kubectl2 exec -it awx-postgres-13-0 bash -n=awx psql -U awx -d postgres DROP DATABASE awx; CREATE DATABASE awx; in my testing env I need to do the same steps 3, 3.1, 3.2.


Step 4 to restore the backup use: $kubectl2 -n awx exec -i awx-postgres-13-0 -- psql -U awx < awx_backup-ace-08-06-2025.sql you will see some data restore actions. also you can check if the database tables, rules are created. kubectl exec -it awx-postgres-13-0 bash -n=awx psql -U awx \d


Step 5 turn on the pots. $kubectl2 scale deployment awx-operator-controller-manager --replicas=1 -n awx $kubectl2 scale deployment awx-web --replicas=1 -n awx $kubectl2 scale deployment awx-task --replicas=1 -n awx


Step 6. wait a minute-2 Check if the awx portal is UP. also everything will be the same. login using the same credentials (google sso)