The question asks for non-sensitive data storage, which is ConfigMap.
Final Answer:
ConfigMap -> Option A
Quick Check:
Non-sensitive config = ConfigMap [OK]
Hint: ConfigMap = non-sensitive config, Secret = sensitive data [OK]
Common Mistakes:
Choosing Secret for non-sensitive data
Confusing Pod or Deployment as config storage
Mixing up ConfigMap and Secret
3. Given this Kubernetes Pod spec snippet using a ConfigMap:
envFrom: - configMapRef: name: app-config
What happens if you update the ConfigMap 'app-config' while the Pod is running?
medium
A. The Pod crashes immediately.
B. The Pod automatically reloads the new configuration without restart.
C. The Pod continues using the old configuration until restarted.
D. The Pod deletes the ConfigMap.
Solution
Step 1: Understand envFrom with ConfigMap
Using envFrom loads ConfigMap data as environment variables at Pod start.
Step 2: Effect of ConfigMap update on running Pod
Environment variables do not update dynamically; Pod must restart to see changes.
Final Answer:
The Pod continues using the old configuration until restarted. -> Option C
Quick Check:
Env vars from ConfigMap update only after Pod restart [OK]
Hint: Env vars from ConfigMap update only after Pod restart [OK]
Common Mistakes:
Assuming automatic reload without restart
Thinking Pod crashes on ConfigMap change
Believing ConfigMap is deleted by Pod
4. You created a Secret in Kubernetes but your Pod fails to access the secret data. Which is the most likely cause?
medium
A. Secrets cannot be used with Pods.
B. The Secret was not mounted or referenced correctly in the Pod spec.
C. The Secret data is stored in plain text and rejected.
D. The Pod must be restarted twice to access Secrets.
Solution
Step 1: Check how Secrets are used in Pods
Secrets must be explicitly mounted as volumes or environment variables in Pod spec.
Step 2: Identify common error
Failing to reference or mount the Secret correctly causes Pod to not see the data.
Final Answer:
The Secret was not mounted or referenced correctly in the Pod spec. -> Option B
Quick Check:
Secret access requires correct Pod spec reference [OK]
Hint: Always verify Secret is mounted or env referenced in Pod spec [OK]
Common Mistakes:
Believing Secrets can't be used with Pods
Thinking Secret data must be plain text
Assuming multiple restarts fix Secret access
5. You want to deploy the same application to development and production environments with different database URLs. How does separating configuration help achieve this in Kubernetes?
hard
A. By embedding the URLs directly in the Pod spec containers' command lines.
B. By building separate container images for each environment with hardcoded URLs.
C. By manually editing the application code before each deployment.
D. By using different ConfigMaps or Secrets for each environment without changing the app code.