Basic install

Basic Install

After cloning this repository, you must choose the tag to run:

git clone
cd awx-operator
git tag
git checkout tags/<tag>

# For instance:
git checkout tags/2.7.2

If you work from a fork and made modifications since the tag was issued, you must provide the VERSION number to deploy. Otherwise the operator will get stuck in "ImagePullBackOff" state:

export VERSION=<tag>

# For instance:
export VERSION=2.7.2

Once you have a running Kubernetes cluster, you can deploy AWX Operator into your cluster using Kustomize. Since kubectl version 1.14 kustomize functionality is built-in (otherwise, follow the instructions here to install the latest version of Kustomize: )

Some things may need to be configured slightly differently for different Kubernetes flavors for the networking aspects. When installing on Kind, see the kind install docs for more details.

There is a make target you can run:

make deploy

If you have a custom operator image you have built, you can specify it with:$YOURNAMESPACE/awx-operator:$YOURTAG make deploy

Otherwise, you can manually create a file called kustomization.yaml with the following content:

kind: Kustomization
  # Find the latest tag here:

# Set the image tags to match the git version from above
  - name:
    newTag: <tag>

# Specify a custom namespace in which to install AWX
namespace: awx

TIP: If you need to change any of the default settings for the operator (such as resources.limits), you can add patches at the bottom of your kustomization.yaml file.

Install the manifests by running this:

$ kubectl apply -k .
namespace/awx created created created created
serviceaccount/awx-operator-controller-manager created created created created created created created created
configmap/awx-operator-awx-manager-config created
service/awx-operator-controller-manager-metrics-service created
deployment.apps/awx-operator-controller-manager created

Wait a bit and you should have the awx-operator running:

$ kubectl get pods -n awx
NAME                                               READY   STATUS    RESTARTS   AGE
awx-operator-controller-manager-66ccd8f997-rhd4z   2/2     Running   0          11s

So we don't have to keep repeating -n awx, let's set the current namespace for kubectl:

$ kubectl config set-context --current --namespace=awx

Next, create a file named awx-demo.yml in the same folder with the suggested content below. The you provide will be the name of the resulting AWX deployment.

Note: If you deploy more than one AWX instance to the same namespace, be sure to use unique names.

kind: AWX
  name: awx-demo
  service_type: nodeport

It may make sense to create and specify your own secret key for your deployment so that if the k8s secret gets deleted, it can be re-created if needed. If it is not provided, one will be auto-generated, but cannot be recovered if lost. Read more here.

If you are on Openshift, you can take advantage of Routes by specifying the following your spec. This will automatically create a Route for you with a custom hostname. This can be found on the Route section of the Openshift Console.

kind: AWX
  name: awx-demo
  service_type: clusterip
  ingress_type: Route

Make sure to add this new file to the list of "resources" in your kustomization.yaml file:

  # Add this extra line:
  - awx-demo.yml

Finally, apply the changes to create the AWX instance in your cluster:

kubectl apply -k .

After a few minutes, the new AWX instance will be deployed. You can look at the operator pod logs in order to know where the installation process is at:

$ kubectl logs -f deployments/awx-operator-controller-manager -c awx-manager

After a few seconds, you should see the operator begin to create new resources:

$ kubectl get pods -l ""
NAME                        READY   STATUS    RESTARTS   AGE
awx-demo-77d96f88d5-pnhr8   4/4     Running   0          3m24s
awx-demo-postgres-0         1/1     Running   0          3m34s

$ kubectl get svc -l ""
NAME                TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)        AGE
awx-demo-postgres   ClusterIP   None           <none>        5432/TCP       4m4s
awx-demo-service    NodePort   <none>        80:31006/TCP   3m56s

Once deployed, the AWX instance will be accessible by running:

$ minikube service -n awx awx-demo-service --url

By default, the admin user is admin and the password is available in the <resourcename>-admin-password secret. To retrieve the admin password, run:

$ kubectl get secret awx-demo-admin-password -o jsonpath="{.data.password}" | base64 --decode ; echo

You just completed the most basic install of an AWX instance via this operator. Congratulations!!!

For an example using the Nginx Ingress Controller in Minikube, don't miss our demo video.