WalzoneInterview Prep
📞 Interviewing soon? Practice with a realistic AI mock phone interview — it calls you, then scores you. First 15 min FREE →

Kubernetes · Advanced · question 58 of 100

Discuss the role of admission controllers in Kubernetes and how they enhance security.?

📕 Buy this interview preparation book: 100 Kubernetes questions & answers — PDF + EPUB for $5

Admission controllers in Kubernetes are a powerful feature that provides a way to enforce policies and security mechanisms for objects that are being created, updated, or deleted in a cluster. Admission controllers intercept and modify API requests before they are persisted to the etcd data store, allowing administrators to enforce specific requirements on the objects created.

Admission controllers can be either mutating or validating. Mutating admission controllers modify the object in some way before it is persisted, while validating admission controllers only check that the object meets certain criteria.

There are many admission controllers available in Kubernetes, including the following:

PodSecurityPolicy: This admission controller validates that the Pod specification meets certain security policies. For example, it can ensure that the Pod runs as a non-root user, or that it doesn’t mount sensitive host directories.

ResourceQuota: This admission controller enforces limits on the amount of resources (such as CPU and memory) that can be requested by a Pod or a Namespace.

NamespaceLifecycle: This admission controller ensures that only authorized users can create, update, or delete Namespaces.

DefaultStorageClass: This admission controller automatically sets a default StorageClass for a PersistentVolumeClaim if none is specified.

ImagePolicyWebhook: This admission controller checks that container images are signed by a trusted authority before they are pulled.

Admission controllers can be managed by modifying the kube-apiserver configuration file. For example, to enable the PodSecurityPolicy admission controller, the following line can be added to the configuration file:

--enable-admission-plugins=PodSecurityPolicy

Admission controllers play an important role in enhancing the security of a Kubernetes cluster, as they allow administrators to enforce specific policies and requirements on the objects created in the cluster. By using admission controllers, administrators can ensure that Pods and other objects are created with security in mind, and that they meet the requirements of the organization.

Reading is step one. Saying it out loud is the interview. Our AI interviewer calls your phone and runs a realistic Kubernetes interview — then scores it.
📞 Practice Kubernetes — free 15 min
📕 Buy this interview preparation book: 100 Kubernetes questions & answers — PDF + EPUB for $5

All 100 Kubernetes questions · All topics