kubernetes-yaml/description/Configuration/ConfigMaps/description.yml

30 lines
1000 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ConfigMaps 说明官方文档https://v1-22.docs.kubernetes.io/zh/docs/concepts/configuration/configmap
# API 版本
apiVersion: v1
# 资源类型
kind: ConfigMap
# 元数据
metadata:
## 名称
name: 此 ConfigMap 的名称
## 命名空间
namespace: 此 ConfigMap 所属命名空间
# 数据( UTF-8 字节类型数据)
data:
## 直接定义属性(每一个键都映射到一个简单的值)
key_name_1: 'key_value_1'
key_name-2: key_value_2
## 定义文件(每一个键都映射到一个文件)
file_name_1.properties: |
key.1.name=key.1.value
key.2.name=key.2.value
file_name_2.properties: |
key.11.name=key.11.value
key.12.name=key.12.value
# 数据(二进制 base64 编码类型数据)
binaryData:
key_name_a: a2V5X3ZhbHVlX2E=
key_name_b: a2V5X3ZhbHVlX2I=
# 配置此 ConfigMaps 为不可变更(此 ConfigMaps 创建后,内容将不可变更,想要变更内容时,只能将此 ConfigMaps 删除后重建)
immutable: true