300-910 · Question #60
A development team uses Kubernetes for application development. Any changes on ConfigMap are performed manually for each development, test, and production environment. The edits are performed to deplo
The correct answer is A. Implement environment variables within the ConfigMaps and store the variable definitions separately from the master branch where the ConfigMaps are stored. To improve the consistency of Kubernetes deployments across environments while accommodating environment-specific configurations, the practice of externalizing environment-specific values from ConfigMap definitions is effective. This ensures that the core ConfigMap structure rema
Question
Exhibit
Options
- AImplement environment variables within the ConfigMaps and store the variable definitions separately from the master branch where the ConfigMaps are stored
- BGenerate the ConfigMaps specific to the environment by using a templating language such as Jinja2 and store the ConfigMaps in unique branches of a repository
- CIn the master branch where the ConfigMaps are stored, create a branch for each environment that contains an environment-specific ConfigMap
- DCreate a unique repository for each environment that contains ConfigMaps for that environment to ensure that each environment can be deployed independently
How the community answered
(29 responses)- A72% (21)
- B3% (1)
- C7% (2)
- D17% (5)
Why each option
To improve the consistency of Kubernetes deployments across environments while accommodating environment-specific configurations, the practice of externalizing environment-specific values from ConfigMap definitions is effective. This ensures that the core ConfigMap structure remains uniform across all environments.
Implementing environment variables within ConfigMaps allows the core configuration structure to remain consistent and version-controlled, while the actual environment-specific values are injected at deployment time from separate, managed definitions. This separation of concerns ensures that the ConfigMap template is uniform, reducing manual errors and guaranteeing consistent deployments across development, test, and production environments.
Generating ConfigMaps with templating is a good practice, but storing the generated environment-specific ConfigMaps in unique branches can lead to version drift and inconsistent updates if the underlying template or configuration logic changes.
Creating a separate branch for each environment's ConfigMap within the master branch effectively duplicates the configuration logic, making it difficult to maintain consistency and propagate changes across environments.
Creating unique repositories for each environment's ConfigMaps drastically increases management overhead and makes it highly challenging to maintain a single source of truth and consistency across environments.
Concept tested: Kubernetes ConfigMap management, consistent deployments
Source: https://kubernetes.io/docs/concepts/configuration/configmap/
Topics
Community Discussion
No community discussion yet for this question.
