advanced
Configuration
Manage environment-specific settings, secrets references, feature flags, and rollout controls without rebuilding service images.
Microservices need environment-specific settings, secrets references, and feature flags without rebuilding images. Central config stores, Kubernetes ConfigMaps and Secrets, or dedicated systems (Spring Cloud Config, Consul) push or pull configuration at runtime.
Trade-off: runtime flexibility versus auditability and the risk of untested config combinations in production.
On interviews: separate config from code; explain secret rotation without downtime; safe feature flag rollout.
Common pitfalls: secrets in images or git; no schema for config keys; changing prod config without version control.
Checklist:
- Externalize config and secrets per environment.
- Validate config at startup with clear errors.
- Audit changes and support rollback.
- Use feature flags for risky toggles.