【k8s】k8s yml json

关于yml配置文件的json转换
https://www.jianshu.com/p/d683f9a71b40

Kubernetes 文档/概念/调度、抢占和驱逐/污点和容忍度
https://kubernetes.io/zh-cn/docs/concepts/scheduling-eviction/taint-and-toleration

YAML 转 JSON
http://www.wetools.com/yaml

tolerations 是一个数组,里面可以列出多个被“容忍”的“污点”,需要写清楚“污点”的名字、效果。
比较特别是要用 operator 字段指定如何匹配“污点”,一般我们都使用 Exists,也就是说存在这个名字和效果的“污点”。

image.png
image.png
tolerations:
- key: "key1"
  operator: "Equal"
  value: "value1"
  effect: "NoSchedule"
- key: "key1"
  operator: "Equal"
  value: "value1"
  effect: "NoExecute"
{
    "tolerations": [
        {
            "key": "key1",
            "operator": "Equal",
            "value": "value1",
            "effect": "NoSchedule"
        },
        {
            "key": "key1",
            "operator": "Equal",
            "value": "value1",
            "effect": "NoExecute"
        }
    ]
}

你可能感兴趣的:(【k8s】k8s yml json)