Question 106 of 997
System HardeningmediumMultiple SelectObjective-mapped

Top Container Image Security Best Practices for Kubernetes

This CKS practice question tests your understanding of system hardening. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. A key principle to apply: container Image Scanning. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Which THREE of the following are recommended practices for securing container images in a Kubernetes environment?

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Scan images for vulnerabilities before deployment

Option A is correct because scanning container images for vulnerabilities before deployment is a fundamental security practice in Kubernetes environments. Tools like Trivy, Clair, or Anchore Grype can identify known CVEs in the base image and application dependencies, allowing teams to remediate issues before the image is run. This aligns with the principle of shifting security left and is a key requirement for compliance with standards like the NIST Application Container Security Guide. Option C is correct because using imagePullSecrets is a recommended practice to authenticate to private container registries. While imagePullSecrets do not enforce access control policies on which images can be pulled, they securely store credentials and enable pods to pull images from private registries, which is essential for using images that are not publicly accessible. This prevents unauthorized access to private images and reduces the risk of using compromised public images. Option D is correct because using minimal base images such as distroless or scratch reduces the attack surface by eliminating unnecessary packages, libraries, and utilities. This aligns with the principle of least functionality and minimizes the number of potential vulnerabilities that could be exploited.

Key principle: Container Image Scanning

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Scan images for vulnerabilities before deployment

    Why this is correct

    Identifies known CVEs.

    Related concept

    Container Image Scanning

  • Store sensitive configuration data directly in the image

    Why it's wrong here

    Secrets should not be baked into images; use Kubernetes Secrets or external vaults.

  • Use imagePullSecrets to restrict which images can be pulled from registries

    Why this is correct

    Prevents unauthorized images from being pulled.

    Related concept

    Container Image Scanning

  • Use minimal base images like distroless or scratch

    Why this is correct

    Reduces the number of tools and libraries that could be exploited.

    Related concept

    Container Image Scanning

  • Run containers as root to avoid permission issues

    Why it's wrong here

    Running as root increases risk of privilege escalation.

Common exam traps

Common exam trap: answer the scenario, not the keyword

CNCF often tests the misconception that imagePullSecrets (Option C) are used to restrict which images can be pulled from registries, but in reality, imagePullSecrets only authenticate to private registries and do not enforce any access control or policy on which images are allowed to be pulled; for restriction, you need an admission controller like OPA/Gatekeeper or a registry firewall.

Detailed technical explanation

How to think about this question

Under the hood, image scanning works by comparing the package manifests (e.g., dpkg status, RPM database, or Alpine APK index) against a vulnerability database like the National Vulnerability Database (NVD) or OS-specific advisories. For minimal base images like distroless or scratch, the attack surface is drastically reduced because they contain no shell, package manager, or unnecessary binaries, which also means fewer packages to scan and fewer false positives. A real-world scenario is the Log4j vulnerability (CVE-2021-44228), where scanning images for the affected library version could have prevented exploitation in Kubernetes clusters.

KKey Concepts to Remember

  • Container Image Scanning
  • imagePullSecrets
  • Minimal Base Images

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Container Image Scanning

Real-world example

How this comes up in practice

A practitioner preparing for the CKS exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Container Image Scanning Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.

What to study next

Got this wrong? Here's your next step.

Review container Image Scanning, then practise related CKS questions on the same topic to reinforce the concept.

Related practice questions

Related CKS practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free CKS practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this CKS question test?

System Hardening — This question tests System Hardening — Container Image Scanning.

What is the correct answer to this question?

The correct answer is: Scan images for vulnerabilities before deployment — Option A is correct because scanning container images for vulnerabilities before deployment is a fundamental security practice in Kubernetes environments. Tools like Trivy, Clair, or Anchore Grype can identify known CVEs in the base image and application dependencies, allowing teams to remediate issues before the image is run. This aligns with the principle of shifting security left and is a key requirement for compliance with standards like the NIST Application Container Security Guide. Option C is correct because using imagePullSecrets is a recommended practice to authenticate to private container registries. While imagePullSecrets do not enforce access control policies on which images can be pulled, they securely store credentials and enable pods to pull images from private registries, which is essential for using images that are not publicly accessible. This prevents unauthorized access to private images and reduces the risk of using compromised public images. Option D is correct because using minimal base images such as distroless or scratch reduces the attack surface by eliminating unnecessary packages, libraries, and utilities. This aligns with the principle of least functionality and minimizes the number of potential vulnerabilities that could be exploited.

What should I do if I get this CKS question wrong?

Review container Image Scanning, then practise related CKS questions on the same topic to reinforce the concept.

What is the key concept behind this question?

Container Image Scanning

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Keep practising

More CKS practice questions

Last reviewed: Jun 30, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This CKS practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CKS exam.