[zh] sync configmap.md
This commit is contained in:
parent
84ed130d3a
commit
75c231d192
|
@ -49,7 +49,7 @@ debug the exact same code locally if needed.
|
|||
|
||||
<!--
|
||||
A ConfigMap is not designed to hold large chunks of data. The data stored in a
|
||||
ConfigMap cannot exeed 1 MiB. If you need to store settings that are
|
||||
ConfigMap cannot exceed 1 MiB. If you need to store settings that are
|
||||
larger than this limit, you may want to consider mounting a volume or use a
|
||||
separate database or file service.
|
||||
-->
|
||||
|
@ -63,7 +63,7 @@ ConfigMap 在设计上不是用来保存大量数据的。在 ConfigMap 中保
|
|||
A ConfigMap is an API [object](/docs/concepts/overview/working-with-objects/kubernetes-objects/)
|
||||
that lets you store configuration for other objects to use. Unlike most
|
||||
Kubernetes objects that have a `spec`, a ConfigMap has `data` and `binaryData`
|
||||
fields. These fields accepts key-value pairs as their values. Both the `data`
|
||||
fields. These fields accept key-value pairs as their values. Both the `data`
|
||||
field and the `binaryData` are optional. The `data` field is designed to
|
||||
contain UTF-8 byte sequences while the `binaryData` field is designed to
|
||||
contain binary data.
|
||||
|
@ -141,7 +141,7 @@ data:
|
|||
There are four different ways that you can use a ConfigMap to configure
|
||||
a container inside a Pod:
|
||||
|
||||
1. Command line arguments to the entrypoint of a container
|
||||
1. Inside a container command and args
|
||||
1. Environment variables for a container
|
||||
1. Add a file in read-only volume, for the application to read
|
||||
1. Write code to run inside the Pod that uses the Kubernetes API to read a ConfigMap
|
||||
|
@ -154,7 +154,7 @@ the ConfigMap when it launches container(s) for a Pod.
|
|||
-->
|
||||
你可以使用四种方式来使用 ConfigMap 配置 Pod 中的容器:
|
||||
|
||||
1. 容器 entrypoint 的命令行参数
|
||||
1. 在容器命令和参数内
|
||||
1. 容器的环境变量
|
||||
1. 在只读卷里面添加一个文件,让应用来读取
|
||||
1. 编写代码在 Pod 中运行,使用 Kubernetes API 来读取 ConfigMap
|
||||
|
|
Loading…
Reference in New Issue