Challenge - 5 Problems
ConfigMaps and Secrets Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
Understanding the primary purpose of ConfigMaps
What is the main purpose of using ConfigMaps in a microservices architecture?
Attempts:
2 left
💡 Hint
Think about how configuration data is separated from application code.
✗ Incorrect
ConfigMaps are used to inject configuration data into containers without rebuilding images. They are not meant for sensitive data.
❓ Architecture
intermediate2:00remaining
Choosing between ConfigMaps and Secrets
You need to store database credentials for your microservices. Which Kubernetes resource should you use and why?
Attempts:
2 left
💡 Hint
Consider security and access control for sensitive information.
✗ Incorrect
Secrets are designed to store sensitive data securely with base64 encoding and tighter access controls, unlike ConfigMaps.
❓ scaling
advanced2:30remaining
Scaling microservices with ConfigMaps and Secrets updates
When you update a ConfigMap or Secret used by multiple microservice pods, what is the best practice to ensure all pods receive the updated data without downtime?
Attempts:
2 left
💡 Hint
Think about minimizing downtime and ensuring consistency.
✗ Incorrect
Rolling updates allow pods to restart gradually, picking up new ConfigMaps or Secrets without causing downtime.
❓ tradeoff
advanced2:00remaining
Tradeoffs of storing secrets in environment variables vs mounted files
What is a key tradeoff when choosing to expose Secrets as environment variables compared to mounting them as files inside containers?
Attempts:
2 left
💡 Hint
Consider how secrets might be exposed inside a running container.
✗ Incorrect
Secrets in environment variables can be exposed via process listings or logs, while mounted files are less exposed but may require restarts for updates.
❓ estimation
expert3:00remaining
Estimating capacity for ConfigMaps and Secrets in a large cluster
You manage a Kubernetes cluster with 1000 microservice pods, each requiring 5 ConfigMaps and 3 Secrets. If each ConfigMap averages 10 KB and each Secret averages 5 KB, estimate the total storage needed for ConfigMaps and Secrets assuming no sharing and no compression.
Attempts:
2 left
💡 Hint
Calculate total size by multiplying counts and sizes, then sum.
✗ Incorrect
Total ConfigMaps size = 1000 pods * 5 ConfigMaps * 10 KB = 50,000 KB (approx 48.8 MB).
Total Secrets size = 1000 pods * 3 Secrets * 5 KB = 15,000 KB (approx 14.6 MB).
Total = 65,000 KB ≈ 63.5 MB, closest to 65 MB.