Lab3 (Spring Boot/K8S): Mastering ConfigMaps in Kubernetes

Eric Anicet
8 min readMay 13, 2024

Hello Devs! Welcome back to our series of stories with Kubernetes and Spring ecosystem. In this story, we’ll learn how to use ConfigMaps in Kubernetes.

· Overview
What are Kubernetes ConfigMaps?
Where are ConfigMaps stored in Kubernetes?
ConfigMap object
· How to use a ConfigMap to configure a container inside a Pod
1. Environment variables for a container
2. Injecting a ConfigMap entry as a command-line argument
3. Mounting ConfigMaps into Pods as volumes
4. Using Immutable ConfigMaps
· Conclusion
· References

This series of stories shows how to use Kubernetes in the Spring ecosystem. We work with a Spring boot API and Minikube to have a lightweight and fast development environment similar to production.

--

--