1.
What are ConfigMaps used for?
Which phases are involved in working with ConfigMaps?
How do you create configMaps?
Imperative ‘kubectl create configmap …’
Adding the key-value pairs as arguments
‘kubectl create configmap
< config-name> –from-literal=< key>=< value>’
‘kubectl create configmap app-config –from-literal=APP_COLOR=blue’
How do you create a config-map from a file?
‘kubectl create config-map app-config –from-file=app_config.properties’
What is the decision where to create a configMap from based on?
How does a declarative configMap look?
Yaml file
apiVersion: v1 kind: ConfigMap metadata: name: app-config data: APP_COLOR: blue APP_MODE: prod
How can you view a config map?
kubectl get configmaps
kubectl describe configmaps
How do you use ConfigMaps in pods?
in Yaml
spec:
containers:
- name:
image:
ports:
- containerPort: 8080
envFrom:
- configMapRef:
name: app-configWhat options exist in regards to defining config maps in pods?
env: - name: APP_COLOR valueFrom: configMapKeyRef: name: app-config key: APP_COLOR
envFrom:
- configMapRef:
name: app-configvolumes:
- name: app-config-volume
configMap:
name: app-configWie wird configmap abgekürzt?
cm