nodeAffinity 추가 Requirements:Use requiredDuringSchedulingIgnoredDuringExecution node affinity Key: color Value: blue Operator - 키값만Name: redReplicas: 2Image: nginxNodeAffinity: requiredDuringSchedulingIgnoredDuringExecutionKey: node-role.kubernetes.io/control-planeUse the right operator 주요 operator 종류 operator 설명 In 값이 지정한 리스트 안에 있으면 매칭 NotIn 값이 지정한 리스트에 없으면 매칭 Exists 해당 key가 노드에 존재하면 매칭 DoesN..
Study/Kubernetes
노드에 taints 설정key=sprayvalue=morteineffect=NoSchedule kubectl node node01 spray=mortein:NoSchedule 파드에 tolerations 설정apiVersion: v1 kind: Pod metadata: name: bee spec: containers: - name: nginx image: nginx tolerations: - key: spray value: mortein effect: NoSchedule 노드에 taints 제거 k taint no controlplane node-role.kubernetes.io/control-plane:NoSchedule-
kubectl label pod pod_name key=valuekubectl label pod pod_name key=value --overwrite #key 값이 같을 때 label 추가, 동일한 키에 value 값 변경kubectl get pods -l name=label_name #label이 같은 파드 출력kubectl label pod pod_name key- #label 제거 kubectl label nodes node_name key=value #node에 label 설정노드 label을 특정지어서 배치할 수 있음spec: container: - name: nodeSelector: gpu: "true" disk: ssd kubectl run cmdpod --image=ngi..