Question 1 — Which of these is NOT a function of admission controllers?
Admission controllers run after authentication and authorization and act on the incoming API request to mutate or validate objects. They do not perform user authentication. Correct answer: authenticate users Explanation: Authentication is performed earlier in the request pipeline (by authentication modules). Admission controllers only see requests that have already been authenticated and authorized, and they can mutate or validate API objects.Question 2 — Which admission controller is NOT enabled by default?
To inspect the apiserver’s help text and see the default-enabled admission plugins, check the--enable-admission-plugins flag from the running kube-apiserver binary inside the control plane pod:
NamespaceAutoProvision is not present.
Correct answer: NamespaceAutoProvision
Question 3 — Which admission controller is enabled in this cluster that is normally disabled?
To see the cluster-specific enabled admission plugins, inspect the static kube-apiserver manifest on the control plane host:NodeRestriction is enabled in the cluster configuration. While NodeRestriction is commonly enabled for security hardening, it might not be present in every distribution by default.
Correct answer: NodeRestriction
Question 4 — Create an nginx Pod in the blue namespace (without creating the namespace beforehand)
If you try to run a Pod against a non-existent namespace, the apiserver will reject the request when the admission controller responsible for namespace lifecycle checks is active.
Attempt to create the Pod:
blue namespace does not exist. To allow automatic on-the-fly creation of namespaces for such requests, the NamespaceAutoProvision admission plugin would need to be enabled.
Question 5 — Enable NamespaceAutoProvision so a namespace is created automatically
Enable NamespaceAutoProvision by editing the kube-apiserver static pod manifest and adding it to the --enable-admission-plugins comma-separated list.
Edit the manifest on the control plane host:
- --enable-admission-plugins=... line and add NamespaceAutoProvision to the list. Example snippet:
blue namespace was auto-created by the NamespaceAutoProvision admission controller.
NamespaceAutoProvision has been deprecated or removed in newer Kubernetes releases. Modern clusters often do not include this admission plugin; instead, create namespaces explicitly or use supported automation mechanisms such as controllers, operators, or CI/CD tooling.
Question 6 — Disable the DefaultStorageClass admission controller
To disable DefaultStorageClass, add the --disable-admission-plugins flag to the kube-apiserver manifest and include DefaultStorageClass in the comma-separated list.
Edit the manifest:
DefaultStorageClass will be disabled for the running apiserver process.
Question 7 — Verify which admission plugins are enabled and disabled on the running kube-apiserver
You can verify the effective enabled and disabled admission plugins by checking either the manifest file or the running kube-apiserver process command line.- Inspect the manifest (static configuration):
- Check the running process arguments on the control plane host:
--enable-admission-plugins and --disable-admission-plugins in the process command line. Example (truncated):
Quick verification checklist
- Inspect apiserver help to see default plugin options:
kubectl exec -n kube-system kube-apiserver-control-plane -- kube-apiserver -h | grep 'enable-admission-plugins'
- View cluster-apiserver manifest to see cluster-specific settings:
grep -E "enable-admission-plugins|disable-admission-plugins" /etc/kubernetes/manifests/kube-apiserver.yaml
- Confirm the running process arguments:
ps -ef | grep kube-apiserver | grep -v grep
Links and references
- Kubernetes admission controllers overview: https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/
- kube-apiserver command line flags: https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/
- Managing static pods and manifests: https://kubernetes.io/docs/tasks/administer-cluster/static-pod/