Exam CKS Topic 1 Question 59 Discussion

Actual exam question for Linux Foundation's CKS exam
Question #: 59
Topic #: 1
You're working on a Kubernetes cluster where container images are pulled from a private registry. Security best practices dictate that you should configure the cluster to only allow image pulls from authorized registries. Explain how you would enforce this policy using image admission controllers and provide a practical example of an admission control configuration.

Suggested Answer:

Solution (Step by Step) :
1. Enable Image Admission Controller:
- Install the Admission Controller. The 'ImagePolicyWebhook' admission controller enforces policies on container images. You can install it as part of your Kubernetes deployment or using a Helm chart.
2. Create a Policy Configuration:
- Define the Policy: Use a YAML file to define the rules for the admission controller. This policy will specify the allowed registries.
- Example Policy Configuration:

3. Configure the Service: - Create a Service: Create a Kubernetes service that exposes the admission controllers endpoint. - Example Service Configuration:

4. Deploy the Policy Engine: - Create a Deployment: Create a Kubernetes deployment to run the policy engine (e.g., a container image with the admission controller logic). - Example Deployment Configuration:

5. Verify the Configuration: - Test Image Pulls: Attempt to pull images from both authorized and unauthorized registries. - Monitor tor Policy Enforcement: Observe the admission controllers logs to confirm that it iS successtully blocking pulls from unauthorized registries. - Validate Security: Ensure that the policy effectively prevents the use of unauthorized container image sources, enhancing the clusters security posture.

by Douglas at Nov 03, 2026, 09:07 PM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

0
0
0
10