skip to content
Alvin Lucillo

Disable default admission controller plugin

/ 1 min read

By default, there are admission plugins enabled in to validate or mutate Kubernetes resources when a request is sent to the API server.

For example, if you want to disable a default plugin DefaultStorageClass, which sets storage class when a PVC is created, update the apiserver’s static pod manifest in the server: /etc/kubernetes/manifests/kube-apiserver.yaml

Look for where the kube-apiserver command is run:

# ...
containers:
  - command:
      - kube-apiserver
      # ...
      - --disable-admission-plugins=DefaultStorageClass

If you want to know the default plugins, either run kube-apiserver -h via:

  1. Pod: k exec -it kube-apiserver-controlplane -n kube-system -- kube-apiserver -h | grep enable-admission-plugins
  2. Linux process: ps -ef | grep kube-apiserver | grep admission-plugins