Skip to content

Commit

Permalink
Polish configure-pod-configmap.md format (#19508)
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinfish authored Mar 6, 2020
1 parent e9342c0 commit 03f13f0
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,16 @@ For example: -->

例如:

# Create the local directory
<!-- # Create the local directory
mkdir -p configure-pod-container/configmap/
# Download the sample files into `configure-pod-container/configmap/` directory
wget https://kubernetes.io/examples/configmap/game.properties -O configure-pod-container/configmap/game.properties
wget https://kubernetes.io/examples/configmap/ui.properties -O configure-pod-container/configmap/ui.properties
# Create the configmap
kubectl create configmap game-config --from-file=configure-pod-container/configmap/ -->

```shell
# 创建本地目录
mkdir -p configure-pod-container/configmap/
Expand Down Expand Up @@ -242,7 +249,7 @@ allowed="true" -->
# env 文件中的每一行必须为 VAR = VAL 格式。
# 以#开头的行(即注释)将被忽略。
# 空行将被忽略。
# 引号没有特殊处理(即它们将成为 ConfigMap 值的一部分)。
# 引号没有特殊处理(即它们将成为 ConfigMap 值的一部分)。
# 将样本文件下载到 `configure-pod-container/configmap/` 目录
wget https://kubernetes.io/examples/configmap/game-env-file.properties -O configure-pod-container/configmap/game-env-file.properties
Expand Down Expand Up @@ -527,6 +534,7 @@ configmap/game-config-5-m67dt67794 created
<!-- To generate a ConfigMap from literals `special.type=charm` and `special.how=very`,
you can specify the ConfigMap generator in `kusotmization.yaml` as -->
要从文字 `special.type=charm``special.how=very` 生成 ConfigMap,可以在 `kusotmization.yaml` 中将 ConfigMap 生成器指定。

<!-- ```shell
# Create a kustomization.yaml file with ConfigMapGenerator
cat <<EOF >./kustomization.yaml
Expand All @@ -537,6 +545,7 @@ configMapGenerator:
- special.type=charm
EOF
``` -->

```shell
# 使用 ConfigMapGenerator 创建 kustomization.yaml 文件
cat <<EOF >./kustomization.yaml
Expand Down

0 comments on commit 03f13f0

Please sign in to comment.