网站首页 返回列表 像“草根”一样,紧贴着地面,低调的存在,冬去春来,枯荣无恙。 节点,pod亲和性与反亲和性 24-09-23 16:20:40 曹大卫 63 ```shell ###节点软亲和 affinity: nodeAffinity: preferredDuringSchedulingIgnoredDuringExecution: - preference: {} weight: 100 requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: category operator: In values: - irtp ###节点硬亲和 affinity: nodeAffinity: ##硬亲和性,且匹配多个节点标签 requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: category operator: In values: - czh - matchExpressions: - key: app operator: In values: - mid ###节点反亲和 affinity: nodeAntiAffinity: preferredDuringSchedulingIgnoredDuringExecution: - preference: matchExpressions: - key: app operator: DoesNotExist weight: 100 ###pod 硬亲和 affinity: podAffinity: requiredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - key: app operator: In values: - mid topologyKey: "kubernetes.io/hostname" ####pod 软亲和 containers: - name: container1 image: nginx affinity: podAffinity: preferredDuringSchedulingIgnoredDuringExecution: - labelSelector: matchExpressions: - key: icbc operator: In values: - 217 topologyKey: "icbc" ``` 关键字词[k8s] 分享到: 上一篇:ingress配置跨域支持 下一篇:pod资源限制 如需留言,请 登录,没有账号?请 注册 0 条评论 0 人参与 最新文章 centos7 rsyslog v8.24.0-34.el7 版本bug efk中将宿主机ip地址采集到日志输出中 企业微信群机器人@成员的方式 promethues operator修改告警规则 centos7配置阿里云yum源 pt-duplicate-key-checker 工具检测mysql是否有重复索引 阿里云ecs扩容磁盘 es启用 tcp和http的ssl后报错 点击排行 alertmanager按标签分发告警到接收者 calico三种网络模式 promethues operator修改告警规则 企业微信群机器人@成员的方式 centos7配置阿里云yum源 最新评论 友情链接
0 条评论 0 人参与