0
0
Microservicessystem_design~5 mins

ConfigMaps and Secrets in Microservices - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a ConfigMap in microservices architecture?
A ConfigMap is a way to store non-sensitive configuration data separately from application code, allowing microservices to access configuration without rebuilding images.
Click to reveal answer
beginner
How do Secrets differ from ConfigMaps?
Secrets store sensitive data like passwords or tokens in an encrypted or base64-encoded form, while ConfigMaps store non-sensitive configuration data in plain text.
Click to reveal answer
intermediate
Why should sensitive data be stored in Secrets rather than ConfigMaps?
Storing sensitive data in Secrets helps protect it by restricting access and encrypting it, reducing the risk of exposure compared to ConfigMaps which are not encrypted.
Click to reveal answer
intermediate
How can microservices access ConfigMaps and Secrets at runtime?
Microservices can access ConfigMaps and Secrets by mounting them as files in containers or by injecting them as environment variables during container startup.
Click to reveal answer
advanced
What is a common best practice when updating ConfigMaps or Secrets in a running microservices environment?
A common best practice is to update ConfigMaps or Secrets carefully and trigger rolling restarts of microservices to reload the new configuration without downtime.
Click to reveal answer
Which of the following is true about ConfigMaps?
AThey cannot be updated without rebuilding the application.
BThey store sensitive data encrypted by default.
CThey store non-sensitive configuration data.
DThey are only used for secrets like passwords.
What is the main purpose of Secrets in microservices?
ATo store container images.
BTo store non-sensitive configuration.
CTo store application logs.
DTo store sensitive information securely.
How can microservices consume Secrets at runtime?
ABy mounting Secrets as files or injecting as environment variables.
BBy storing them in public repositories.
CBy embedding them directly in the source code.
DBy hardcoding them in container images.
Which practice helps safely update ConfigMaps or Secrets without downtime?
ATriggering rolling restarts of microservices.
BIgnoring updates until next deployment.
CRebuilding container images immediately.
DDeleting and recreating all microservices.
Why should sensitive data not be stored in ConfigMaps?
ABecause ConfigMaps are encrypted by default.
BBecause ConfigMaps are stored in plain text and less secure.
CBecause ConfigMaps cannot be updated.
DBecause ConfigMaps are only for logs.
Explain the difference between ConfigMaps and Secrets in microservices and why each is important.
Think about security and configuration management.
You got /4 concepts.
    Describe how you would update a Secret in a running microservices environment without causing downtime.
    Consider safe update and reload strategies.
    You got /4 concepts.