yaml语法总结
Map 是字典,就是⼀个 key:value 的键值对Lists 就是列表,说⽩了就是数组
1、image
containers:
image: cnych/liveness
2、selector
selector:
matchLabels:
app: mynginx-test
3、containers <[]Object>
spec:
containers:
- name: nginx-pod
image: "nginx"
- name: content
image: "alpine"
4、initialDelaySeconds
livenessProbe:
exec:
command:
- cat
- /tmp/healthy
initialDelaySeconds: 5
5、matchLabels <map[string]string>
selector:
matchLabels:
app: mynginx-test
app: v1
6、command <[]string>
command:
- cat
- /tmp/healthy