[zh] Update configure pod configmap

This PR resyncs the configure-pod-configmap page, and translates the comments in the reference example YAML files.
This commit is contained in:
Qiming Teng
2022-03-13 13:45:28 +08:00
parent 1159c42559
commit 2d0d647d0b
3 changed files with 115 additions and 80 deletions
@@ -13,7 +13,6 @@ spec:
volumes:
- name: config-volume
configMap:
# Provide the name of the ConfigMap containing the files you want
# to add to the container
# 提供包含要添加到容器中的文件的 ConfigMap 的名称
name: special-config
restartPolicy: Never
@@ -8,12 +8,12 @@ spec:
image: k8s.gcr.io/busybox
command: [ "/bin/sh", "-c", "env" ]
env:
# Define the environment variable
# 定义环境变量
- name: SPECIAL_LEVEL_KEY
valueFrom:
configMapKeyRef:
# The ConfigMap containing the value you want to assign to SPECIAL_LEVEL_KEY
# ConfigMap 包含你要赋给 SPECIAL_LEVEL_KEY 的值
name: special-config
# Specify the key associated with the value
# 指定与取值相关的键名
key: special.how
restartPolicy: Never