Uma dica rápida pra subir o AWX no Fedora CoreOS com K3S
Primeiro, vamos instalar o pacote k3s-selinux via rpm-ostree:
# rpm-ostree install https://github.com/k3s-io/k3s-selinux/releases/download/v0.3.stable.0/k3s-selinux-0.3-0.el8.noarch.rpm
Reinicie
# systemctl reboot
Agora vamos fazer a instalação do k3s:
# export K3S_KUBECONFIG_MODE="644"
# export INSTALL_K3S_EXEC="--flannel-backend=host-gw"
# curl -sfL https://get.k3s.io | sh -
Vamos criar o diretório para o Persistent Volume
#mkdir -p /var/k8s-pv/awx-postgres
# cat <<EOF >> awx-postgres-pv.yml
apiVersion: v1
kind: PersistentVolume
metadata:
name: postgres-awx-postgres-0
labels:
type: local
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/var/k8s-pv/awx-postgres"
EOF
cria um arquivo agora
# echo "
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
name: awx
spec:
tower_ingress_type: Ingress
" > awx.yml
Agora vamos executar
# kubectl apply -f awx-postgres-pv.yml
# kubectl apply -f https://raw.githubusercontent.com/ansible/awx-operator/devel/deploy/awx-operator.yaml
# kubectl apply -f awx.yml
Agora só acompanhar vendo os logs
kubectl logs -f awx-operator-........
e ao final
Verifique em qual porta esta rodando o awx no caso na porta 30922
# kubectl get svc
e verifique a senha de admin
# kubectl get secret awx-admin-password -o jsonpath='{.data.password}' | base64 --decode
e só acessar agora