tasks/configure-pod-container/configure-pod-configmap/

This commit is contained in:
yoshiki0705
2020-05-05 21:08:46 +09:00
parent 27d1a97299
commit 03dbe94df3
9 changed files with 809 additions and 0 deletions
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Pod
metadata:
name: dapi-test-pod
spec:
containers:
- name: test-container
image: k8s.gcr.io/busybox
command: [ "/bin/sh", "-c", "env" ]
env:
# 環境変数を定義します
- name: SPECIAL_LEVEL_KEY
valueFrom:
configMapKeyRef:
# SPECIAL_LEVEL_KEYに割り当てる値をConfigMapが保持します
name: special-config
# 値に紐付けるキーを指定します
key: special.how
restartPolicy: Never