How to require one pod per minion/kublet when configuring a replication controller?

后端 未结 3 753
情深已故
情深已故 2021-01-06 11:59

I have 4 nodes (kubelets) configured with a label role=nginx

master ~ # kubectl get node
NAME          LABELS                               


        
3条回答
  •  别那么骄傲
    2021-01-06 12:55

    I was able to achieve this by modifying the labels as follows below

    master ~ # kubectl get nodes -o wide
    NAME          LABELS                                           STATUS
    10.1.141.34   kubernetes.io/hostname=10.1.141.34,role=nginx1   Ready
    10.1.141.40   kubernetes.io/hostname=10.1.141.40,role=nginx2   Ready
    10.1.141.42   kubernetes.io/hostname=10.1.141.42,role=nginx3   Ready
    10.1.141.43   kubernetes.io/hostname=10.1.141.43,role=nginx4   Ready
    

    I then created 4 nginx replication controllers each referencing the nginx{1|2|3|4} roles and labels.

提交回复
热议问题