When attempting to delete the ascender namespace in a Kubernetes cluster with Automation Mesh enabled, the deletion process hangs and never completes. This occurs because a finalizer on the AWX Mesh Ingress resource prevents the namespace from terminating.
Automation Mesh is enabled by setting the ASCENDER_MESH_HOSTNAME environment variable. This configuration creates an Ingress object (specifically an awxmeshingress.awx.ansible.com custom resource). When the ascender namespace is deleted, the finalizer on this resource blocks deletion until it is manually cleared.
- Running
kubectl delete namespace ascenderhangs indefinitely. - Inspecting the namespace shows a
Terminatingstatus. - The
awxmeshingress.awx.ansible.comresource namedascender-app-meshexists with finalizers.
After attempting to delete the namespace, you can verify what remains by executing this command.
kubectl api-resources --verbs=list --namespaced -o name | xargs -n 1 kubectl get --show-kind --ignore-not-found -n ascenderYou should only see this object remaining.
ingressroutetcp.traefik.io/ascender-app-mesh
To resolve this issue, manually remove the finalizers from the AWX Mesh Ingress resource and reattempt the namespace deletion.
This starts the deletion process without blocking the shell, allowing you to proceed to the next step.
kubectl delete --wait=false namespace ascenderThis command removes the finalizers that are preventing the namespace from being deleted.
kubectl patch awxmeshingress.awx.ansible.com/ascender-app-mesh -n ascender -p '{"metadata":{"finalizers":[]}}' --type=mergeAfter running this command, the namespace deletion should continue.
Now lets attempt to delete the namespace again to verify its gone.
kubectl delete namespace ascenderThis time, the namespace should be deleted successfully.
- Ensure you have cluster-admin privileges to modify finalizers and delete namespaces.
- This issue only arises when Automation Mesh is enabled via the ASCENDER_MESH_HOSTNAME environment variable.
- Consider filing a bug report or enhancement request if deleting the namespace continues to hang in your deployment.