ConfigMap
# ConfigMap 常用配置项
# 1一个简单的ConfigMap
apiVersion: v1
kind: ConfigMap
metadata:
creationTimestamp: null
name: cm
data:
abc: "123"
1
2
3
4
5
6
7
2
3
4
5
6
7
# 通过 ConfigMap 构建一个地址池
wget https://raw.githubusercontent.com/metallb/metallb/v0.9.5/manifests/metallb.yaml
1
apiVersion: v1
kind: ConfigMap
metadata:
namespace: metallb-system
name: config
data:
config: |
address-pools:
- name: default
protocol: layer2
addresses:
- 192.168.80.111-192.168.80.120
1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
编辑 (opens new window)