在指定节点部署Ingress服务

  sre

打标签

kubectl label nodes node01 node-role.kubernetes.io/ingress="true"
kubectl label nodes node02 node-role.kubernetes.io/ingress="true"

更新deployment,增加nodeSelector配置

kubectl -n kube-system patch deployment nginx-ingress-controller -p '{"spec": {"template": {"spec": {"nodeSelector": {"node-role.kubernetes.io/ingress": "true"}}}}}'

LEAVE A COMMENT

Captcha Code