- Docs
- Cluster management
- Troubleshooting
- Troubleshoot cluster operations blocked by admission rules
Troubleshoot cluster operations blocked by admission rules
Admission webhooks and policies can block requests Syself needs to manage a cluster. This can stop upgrades, prevent nodes from joining, or leave controllers unable to reconcile resources.
Find the blocking admission rule
Start by checking the admission webhooks and policies configured on the affected cluster:
kubectl get validatingwebhookconfigurations
kubectl get mutatingwebhookconfigurations
kubectl get validatingadmissionpolicies
kubectl get validatingadmissionpolicybindings
kubectl get mutatingadmissionpolicies
kubectl get mutatingadmissionpolicybindings
Look for rules that match the affected resources and operations. Pay particular attention to webhooks with failurePolicy: Fail: if the webhook rejects a request or is unavailable, the API server rejects the request too.
Rules installed on your cluster block requests to its API server, including the requests Syself sends from the management cluster. Look for warning events that name the webhook or policy:
kubectl get events -A --field-selector type=Warning | grep -iE 'webhook|admission'
The webhook backend's logs also show which requests it rejected.
Remove the blocking admission rule
Once you've identified the rule, disable it or remove it temporarily.
For a webhook, delete its configuration:
kubectl delete validatingwebhookconfiguration <name>
kubectl delete mutatingwebhookconfiguration <name>
For an admission policy, delete its binding. This disables the policy without deleting the policy itself:
kubectl delete validatingadmissionpolicybinding <name>
kubectl delete mutatingadmissionpolicybinding <name>
Only run the command for the resource you've identified. If another admission rule also blocks deletion, disable that rule first.
After removing the blocker, check whether the affected operation resumes.
Identify the blocked operation
The following symptoms can help narrow down which requests are being blocked.
An upgrade does not start
In the management cluster, the Cluster resource may remain at TopologyReconciled=False. Check its conditions:
kubectl describe cluster <cluster-name> -n <namespace>
The condition shows a message similar to:
Following hooks are blocking upgrade: BeforeClusterUpgrade
Before rolling machines, Syself updates platform resources such as Deployments, DaemonSets, ConfigMaps, RBAC resources, and CRDs in kube-system of your cluster.
A webhook with failurePolicy: Fail on your cluster that matches these resources can prevent the upgrade from progressing.
New nodes do not become Ready
New nodes may remain NotReady, or their Machines may report:
cni plugin not initialized
Syself expects platform components such as Cilium, the CSI node plugin, and control-plane components such as etcd and the API server to become healthy. If they cannot start, the node may fail its health check and be replaced after five minutes.
Check whether admission rules block requests involving:
- Creating pods or service accounts, or creating service-account tokens
- Binding pods or updating pod status
- Updating node status
- Creating privileged platform pods
- Mutating node selectors so platform pods cannot schedule
Check the events for the affected DaemonSets and pods as well.
New Machines do not join the cluster
In the management cluster, check the Machines of your cluster:
kubectl get machines -n <namespace>
Machines may remain Pending with:
bootstrap not ready yet
Or they may reach Provisioned but report:
Waiting for a Node with spec.providerID ... to exist
Node registration depends on several API operations, including creating and approving CSRs, creating or updating Nodes, and setting the node's providerID.
Admission rules on your cluster that reject these requests can prevent a Machine from joining. Check for rules matching CSRs, Nodes, and their subresources, including /approval.
A control-plane machine cannot be replaced
In the management cluster, check the KubeadmControlPlane of your cluster:
kubectl describe kubeadmcontrolplane -n <namespace>
It may report that there are no ready machines or that it:
Failed to connect to etcd
Syself accesses etcd through a port-forward to an etcd pod on your cluster. A webhook on your cluster that matches CONNECT requests to pods/portforward can block this connection.
Check for webhooks matching pods/*, especially those that restrict exec or port-forward requests.
Nodes are Ready, but controllers stop reconciling
If nodes are healthy but reconciliation has stopped, check the leader-election Leases in kube-system:
kubectl -n kube-system get leases
Controllers such as the scheduler, controller manager, and cloud controller manager use Leases to maintain leadership. A webhook that blocks Lease creation or updates can prevent them from renewing their leases. Check whether their renewTime values are stale, particularly if they have not changed for more than a minute.
Operations are unusually slow
A webhook can also delay operations without rejecting requests. For example, its backend may accept connections but never respond.
With failurePolicy: Ignore, the API server waits for the webhook to time out before continuing. Requests matching that webhook can therefore take much longer than usual.
Check the webhook backend's health and reduce timeoutSeconds if appropriate.
Prevent admission rules from blocking platform operations
After restoring the cluster, update the webhook or policy so it does not interfere with Syself's platform resources.
- Scope rules to the application namespaces and resources they need to protect.
- Exclude platform namespaces and resources where appropriate.
- Avoid matching broad resource patterns or subresources unless necessary.
- Make sure webhook backends remain available and respond within their configured timeout.
For examples of configuring admission rules, see Control admission and Kyverno.
If the cluster does not recover after removing the blocker, or a control plane is left with too few healthy machines, contact Syself Support. If more than one etcd member has been lost, etcd recovery may be required.