Skip to content

Instantly share code, notes, and snippets.

@guerzon
Created June 23, 2022 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guerzon/c184abc1c3dba1329e81163c42ef9ad6 to your computer and use it in GitHub Desktop.
Save guerzon/c184abc1c3dba1329e81163c42ef9ad6 to your computer and use it in GitHub Desktop.
Deploy the AWX Kubernetes Operator
## awx namespace
export NAMESPACE=awx
kubectl create ns $NAMESPACE
## secrets
cat <<EOF > awx-secrets.yml
---
apiVersion: v1
kind: Secret
metadata:
name: awx-admin-password
namespace: awx
stringData:
password: Sup3rsecret
EOF
cat <<EOF > awx.yml
---
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
name: awx
namespace: awx
spec:
service_type: ClusterIP
postgres_storage_class: local-path
admin_user: lester
admin_email: lester@pidnull.io
EOF
kubectl create -f awx-secrets.yml
kubectl -n awx get secret awx-admin-password \
-o jsonpath="{.data.password}" | \
base64 --decode; echo
## get the operator
git clone https://github.com/ansible/awx-operator.git
cd awx-operator
git checkout 0.20.0
make deploy
## Deploy
# verify
cd ..
kubectl create -f awx.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment