How to Deploy Same Kubernetes Configs Across Environments Without Static Locations?
A DevOps engineer wants to allow the same Kubernetes container configurations to be deployed in development, testing, and production environments. A key requirement is that the containers should be configured so that developers do not have to statically configure custom, environment-specific locations. Which of the following should the engineer use to meet this requirement?
Community Votes
67% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
This question tests whether you understand the ambassador/sidecar container pattern for abstracting environment-specific service discovery and configuration; the main trap is confusing overlay networks (which handle pod-to-pod traffic) with environment-specific endpoint decoupling.
When you need to deploy identical Kubernetes container configurations across development, testing, and production without hard-coding environment-specific endpoints, the recommended solution is the ambassador container pattern. The community vote heavily favors option D (ambassador container) over overlay network, which only handles pod connectivity, not service endpoint abstraction.
Choosing C (overlay network) is the most common error because overlay networks provide IP-level abstraction, but they still require applications to know the right service endpoints or DNS names, whereas the ambassador container solves the exact requirement of avoiding statically configured environment-specific locations.
Community Discussion (4 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
The ambassador container pattern places a proxy container alongside the application container. The application only talks to 'localhost', and the ambassador handles the actual service endpoint, database location, TLS, and other environment-specific settings. This design lets the same application container be reused across dev, test, and prod without changing its configuration, exactly matching the requirement.
Community comment [1] explains that ambassador containers act as a proxy and enable dynamic configuration of service endpoints, while comment [2] notes the application remains agnostic and simply talks to its ambassador. The suggested answer D is therefore the strongest fit.
Why the Other Options Are Wrong
Option C (overlay network) is the closest distractor. An overlay network abstracts the underlying network topology and allows pods to communicate across nodes, but it does not abstract environment-specific service locations such as a database URL or an external API endpoint; the application still needs to know what address to use.
Option B (node affinity) controls which nodes pods are scheduled on, which is unrelated to configuration or endpoint abstraction. Option A (custom scheduler) also deals with pod placement, not container configuration. Both fail the stated requirement of avoiding static custom, environment-specific locations.
Community Comment Notes
The votes were D:67, C:33, showing that many were tempted by overlay networking. Comment [3] incorrectly claims overlay networks allow containers to be deployed in any environment without static configuration, but that is only true for intra-cluster pod connectivity, not for external service endpoints. Comment [4] repeats the same misconception. The more accurate and widely accepted answer remains the ambassador container.
Official Reference
Exam Strategy
When seeing 'environment-specific locations' or 'service endpoints' in a Kubernetes scenario, focus on the ambassador container pattern rather than networking features. Remember: overlay networks handle inter-pod communication, while ambassador containers handle app-to-external-service configuration decoupling, so eliminate any node-placement options first.