In a vSphere Kubernetes Service (VKS) cluster, one or more pods are not creating.
If it is a VKS system pod that is failing to create, it will be flagged as an Addons Reconciliation failure on the VKS cluster.
While connected to the VKS cluster's context, the following symptoms are observed:
kubectl get pkgi -A
kubectl describe deployment -n <deployment namespace> <deployment>
kubectl describe replicaset -n <replicaset namespace> <replicaset>
Warning FailedCreate - Error creating: pods "<pod>" is forbidden: violates PodSecurity: <podSecurity setting>Where <podSecurity setting> is one of the podSecurities defined in Kubernetes such as "restricted:latest".kubectl get pods,validatingwebhookconfiguration,mutatingwebhookconfiguration -A | grep -i k8tz
k8tz pod/k8tz-<id>
k8tz mutatingwebhookconfiguration/admission-controller.k8tz.iovSphere Supervisor
vSphere Kubernetes Service (VKS)
k8tz is a third party application that can manage podSecurity within a Kubernetes cluster.
In this scenario, pod creation is being blocked by k8tz.
This can result in customer application pods and VKS system pods failing to create.
Failed VKS system pods will prevent upgrades to the vSphere Kubernetes Release (VKR) of a VKS cluster.
Because k8tz is not a VMware by Broadcom product, we cannot advise on its proper configuration.
Our only workaround would be to temporarily backup and take down k8tz.
kubectl get mutatingwebhookconfiguration | grep k8tz
kubectl get mutatingwebhookconfiguration <k8tz mutatingwebhookconfiguration> -o yaml > k8tz-mwc.yaml
kubectl delete mutatingwebhookconfiguration <k8tz mutatingwebhookconfiguration>
kubectl scale deployment -n k8tz k8tz --replicas=0
kubectl get pods,mutatingwebhookconfiguration -A | grep -i k8tz
kubectl get deployment -n <pod namespace>
kubectl rollout restart deployment -n <pod namespace> <deployment>kubectl get deployment,replicaset,pod -n <pod namespace>
kubectl get app -A | grep -i <pod>
kubectl patch app <app name> -n <app namespace> --type='merge' -p '{"spec":{"syncPeriod":"9m"}}'
kubectl get pkgi -AFuture Considerations
kubectl apply -f k8tz-mwc.yaml