Bird
0
0

Given this ConfigMap YAML snippet for feature flags:

medium📝 Command Output Q13 of 15
Kubernetes - Advanced Deployment Patterns
Given this ConfigMap YAML snippet for feature flags:
apiVersion: v1
kind: ConfigMap
metadata:
  name: feature-flags
data:
  FEATURE_X_ENABLED: "true"
  FEATURE_Y_ENABLED: "false"

What will be the value of FEATURE_Y_ENABLED when accessed as an environment variable in a pod?
Afalse
Btrue
Cnull
Dundefined
Step-by-Step Solution
Solution:
  1. Step 1: Read ConfigMap data values

    The ConfigMap sets FEATURE_Y_ENABLED to the string "false" explicitly.
  2. Step 2: Understand environment variable mapping

    When injected as env vars, values are strings exactly as in ConfigMap, so FEATURE_Y_ENABLED will be "false".
  3. Final Answer:

    false -> Option A
  4. Quick Check:

    ConfigMap value "false" = env var "false" [OK]
Quick Trick: Env vars get exact string values from ConfigMap [OK]
Common Mistakes:
  • Assuming boolean false instead of string "false"
  • Thinking missing keys return null or undefined
  • Confusing string values with boolean types

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes