When deploying the awx-operator for the first time on a new K3s cluster, i use the following command: kubectl apply -k .
This procudes the following output:
namespace/awx created
customresourcedefinition.apiextensions.k8s.io/awxbackups.awx.ansible.com created
customresourcedefinition.apiextensions.k8s.io/awxmeshingresses.awx.ansible.com created
customresourcedefinition.apiextensions.k8s.io/awxrestores.awx.ansible.com created
customresourcedefinition.apiextensions.k8s.io/awxs.awx.ansible.com created
serviceaccount/awx-operator-controller-manager created
role.rbac.authorization.k8s.io/awx-operator-awx-manager-role created
role.rbac.authorization.k8s.io/awx-operator-leader-election-role created
clusterrole.rbac.authorization.k8s.io/awx-operator-metrics-reader created
clusterrole.rbac.authorization.k8s.io/awx-operator-proxy-role created
rolebinding.rbac.authorization.k8s.io/awx-operator-awx-manager-rolebinding created
rolebinding.rbac.authorization.k8s.io/awx-operator-leader-election-rolebinding created
clusterrolebinding.rbac.authorization.k8s.io/awx-operator-proxy-rolebinding created
configmap/awx-operator-awx-manager-config created
service/awx-operator-controller-manager-metrics-service created
deployment.apps/awx-operator-controller-manager created
ingress.networking.k8s.io/awx-network-ingress created
error: resource mapping not found for name: "awx-network" namespace: "awx" from ".": no matches for kind "AWX" in version "awx.ansible.com/v1beta1"
ensure CRDs are installed first
If I do a kubectl delete -k .
and wait a few minutes, then try kubectl apply -k .
again everything works fine.
I guess there may be some depencencies or the order I have defined things that causes this behavior. Anyone with any insights?
Below are the files involved:
kustomization.yaml
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- github.com/ansible/awx-operator/config/default?ref=2.19.1
- awx-network.yaml
- awx-traefik-ingress.yaml
# Set the image tags to match the git version from above
images:
- name: quay.io/ansible/awx-operator
newTag: 2.19.1
# Specify a custom namespace in which to install AWX
namespace: awx
awx-network.yaml
---
apiVersion: awx.ansible.com/v1beta1
kind: AWX
metadata:
name: awx-network
spec:
service_type: LoadBalancer
awx-traefik-ingress.yaml
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
namespace: awx
name: awx-network-ingress
annotations:
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.tls: "true"
spec:
tls:
- hosts:
- awx.domain.com
secretName: awx-network-cert
rules:
- host: awx.domain.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: awx-network-service
port:
number: 80