kubernetes-up-and-running/13-2-kuard-config.yaml
Lachlan Evenson 538e70a327
Chapter 13 updates
Signed-off-by: Lachlan Evenson <lachlan.evenson@gmail.com>
2024-01-29 21:08:40 -08:00

36 lines
951 B
YAML

apiVersion: v1
kind: Pod
metadata:
name: kuard-config
spec:
containers:
- name: test-container
image: gcr.io/kuar-demo/kuard-amd64:blue
imagePullPolicy: Always
command:
- "/kuard"
- "$(EXTRA_PARAM)"
env:
# An example of an environment variable used inside the container
- name: ANOTHER_PARAM
valueFrom:
configMapKeyRef:
name: my-config
key: another-param
# An example of an environment variable passed to the command to start
# the container (above).
- name: EXTRA_PARAM
valueFrom:
configMapKeyRef:
name: my-config
key: extra-param
volumeMounts:
# Mounting the ConfigMap as a set of files
- name: config-volume
mountPath: /config
volumes:
- name: config-volume
configMap:
name: my-config
restartPolicy: Never