0
0
Kubernetesdevops~20 mins

Why configuration separation matters in Kubernetes - Challenge Your Understanding

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Config Separation Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Why separate configuration from application code in Kubernetes?

In Kubernetes, why is it important to keep configuration data separate from application code?

AIt reduces the size of the application container image by embedding configs inside it.
BIt allows updating configuration without rebuilding or redeploying the application container.
CIt forces developers to write configuration inside the application source code for better control.
DIt prevents Kubernetes from managing application secrets and config maps.
Attempts:
2 left
💡 Hint

Think about how changing settings without changing the app code helps in real life.

💻 Command Output
intermediate
2:00remaining
Output of applying ConfigMap separately from Deployment

What is the result of running kubectl apply -f configmap.yaml before applying deployment.yaml that uses this ConfigMap?

Kubernetes
kubectl apply -f configmap.yaml
kubectl apply -f deployment.yaml
ADeployment pods start with the configuration values from the ConfigMap applied.
BDeployment fails because ConfigMap must be created after the Deployment.
CPods start but ignore the ConfigMap values and use defaults.
Dkubectl apply command returns an error about missing ConfigMap.
Attempts:
2 left
💡 Hint

Think about how Kubernetes uses ConfigMaps when pods start.

🔀 Workflow
advanced
2:30remaining
Best workflow to update app configuration without downtime

You want to update configuration for a running Kubernetes app without downtime. Which workflow achieves this?

AUpdate the ConfigMap, then rollout restart the Deployment to reload pods with new config.
BEdit the Deployment YAML to embed new config values directly inside container spec and apply.
CDelete the Deployment and recreate it with new configuration embedded in the container image.
DUpdate the ConfigMap and wait; pods automatically reload config without restart.
Attempts:
2 left
💡 Hint

Consider how pods read config and when they pick up changes.

Troubleshoot
advanced
2:30remaining
Why does my pod not see updated ConfigMap values?

You updated a ConfigMap but your running pod still shows old configuration values. What is the most likely reason?

AConfigMap data is cached inside the container image and cannot be changed at runtime.
BConfigMap updates are blocked by Kubernetes RBAC permissions.
CThe ConfigMap was deleted automatically after update due to retention policy.
DPods do not automatically reload ConfigMap changes; they need to be restarted.
Attempts:
2 left
💡 Hint

Think about how pods consume ConfigMap data and when they refresh it.

Best Practice
expert
3:00remaining
Why use ConfigMaps and Secrets instead of hardcoding config in manifests?

What is the main advantage of using ConfigMaps and Secrets for configuration in Kubernetes instead of hardcoding values directly inside Deployment manifests?

AThey automatically encrypt all configuration data without user intervention.
BThey force all configuration to be stored in environment variables inside containers.
CThey allow secure, centralized, and dynamic management of configuration and sensitive data separately from app code.
DThey reduce the number of Kubernetes objects, simplifying cluster management.
Attempts:
2 left
💡 Hint

Think about security, flexibility, and ease of updates in real-world apps.