Lab 5.1 - Creating and Using ConfigMaps
Objectives
- Create ConfigMaps
- Inject into Pods
- Use as volumes
Exercise 1: Create a ConfigMap
# From the command line
kubectl create configmap app-config --from-literal=log_level=info
# From a file
kubectl create configmap app-config --from-file=config.properties
Exercise 2: Use in a Pod
Create a Pod that uses the ConfigMap as environment variables and as a volume.
Lab created: December 2024