k8s调度-指定node
Posted puroc
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了k8s调度-指定node相关的知识,希望对你有一定的参考价值。
1、给node加标签
kubectl label nodes k8s-slave2 slave=184
2、查看标签
[[email protected]_master centos7]# kubectl describe node k8s-slave2 Name: k8s-slave2 Labels: beta.kubernetes.io/arch=amd64 beta.kubernetes.io/os=linux kubernetes.io/hostname=k8s-slave2 slave=184 Taints: <none> CreationTimestamp: Wed, 31 Aug 2016 17:42:09 +0800
3、rc文件中指定NodeSelector
apiVersion: v1 kind: ReplicationController metadata: name: centos-master labels: name: centos-master spec: replicas: 1 selector: name: centos-master template: metadata: labels: name: centos-master spec: containers: - name: centos image: 10.10.30.180/library/centos7:v1 nodeSelector: slave: "184"
以上是关于k8s调度-指定node的主要内容,如果未能解决你的问题,请参考以下文章