Question 14 of 991
Application Environment, Configuration and SecuritymediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is UID 1000 and GID 2000 for the process inside the container. This is because the `runAsUser` and `runAsGroup` fields in the SecurityContext directly control the user and group identity of the main container process, overriding any default image settings. The `fsGroup` field, set to 3000 here, only affects the group ownership of any volumes mounted into the pod, not the process’s primary GID. On the CKAD exam, this distinction is a frequent trap: candidates often confuse `fsGroup` with the process group, but the exam tests your understanding that `runAsUser` and `runAsGroup` are the sole determinants of the process’s UID and GID. A reliable memory tip is to think of “run” as the active process identity, while “fs” stands for filesystem ownership only—so the process runs with the “run” values, not the “fs” values.

CKAD Practice Question: Application Environment, Configuration and Security

This CKAD practice question tests your understanding of application environment, configuration and security. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. 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.

A pod is running with the following SecurityContext: securityContext: runAsUser: 1000 runAsGroup: 2000 fsGroup: 3000 What UID and GID does the process inside the container use?

Question 1mediummultiple choice
Full question →

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

UID 1000, GID 2000

The `runAsUser` and `runAsGroup` fields in the Pod's SecurityContext directly set the UID and GID for the container's main process. Here, `runAsUser: 1000` sets the process UID to 1000, and `runAsGroup: 2000` sets the process GID to 2000. The `fsGroup: 3000` field only applies to the group ownership of mounted volumes, not to the process's primary GID.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

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

  • UID 1000, GID 3000

    Why it's wrong here

    fsGroup sets the group for volumes, not the process primary GID.

  • UID 1000, GID 2000

    Why this is correct

    runAsUser sets UID, runAsGroup sets GID. Both apply to the container process.

    Related concept

    Read the scenario before looking for a memorised answer.

  • UID 0, GID 2000

    Why it's wrong here

    runAsUser is specified as 1000, so UID is not 0.

  • UID 3000, GID 2000

    Why it's wrong here

    fsGroup does not affect the UID of the container process.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates confuse `fsGroup` with the process's primary GID, thinking it overrides `runAsGroup`, when in fact `fsGroup` only affects volume group ownership and does not change the process's GID.

Detailed technical explanation

How to think about this question

Under the hood, the container runtime (e.g., runc) applies these settings via Linux kernel capabilities and user namespace mappings. The `runAsUser` and `runAsGroup` are implemented using the `setuid` and `setgid` syscalls at process start, while `fsGroup` uses the `chown` syscall to change group ownership of any volumes mounted into the Pod. A real-world scenario: if a Pod needs to write to a shared NFS volume with GID 3000, `fsGroup` ensures the volume is accessible, but the process itself still runs with GID 2000 for security isolation.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

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

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A practitioner preparing for the CKAD 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. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. 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.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related CKAD 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 CKAD 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 CKAD question test?

Application Environment, Configuration and Security — This question tests Application Environment, Configuration and Security — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: UID 1000, GID 2000 — The `runAsUser` and `runAsGroup` fields in the Pod's SecurityContext directly set the UID and GID for the container's main process. Here, `runAsUser: 1000` sets the process UID to 1000, and `runAsGroup: 2000` sets the process GID to 2000. The `fsGroup: 3000` field only applies to the group ownership of mounted volumes, not to the process's primary GID.

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

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

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

Same concept, more angles

1 more ways this is tested on CKAD

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A pod manifest includes the following securityContext: securityContext: { runAsUser: 1000, runAsGroup: 3000, fsGroup: 2000 }. What UID will be used for processes in the container?

medium
  • A.0 (root)
  • B.3000
  • C.2000
  • D.1000

Why D: Option D is correct because the `runAsUser` field in the pod's securityContext explicitly sets the user ID (UID) for all processes in the container. In this manifest, `runAsUser: 1000` overrides the default UID (usually 0, root) and ensures that the container's main process runs with UID 1000. The `runAsGroup` and `fsGroup` fields affect group IDs and file ownership, not the process UID.

Last reviewed: Jun 25, 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 CKAD 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 CKAD exam.