"쿠버네티스 Node Affinity"의 두 판 사이의 차이

5번째 줄: 5번째 줄:


{| class='wikitable'
{| class='wikitable'
| requiredDuringSchedulingIgnoredDuringExecution || hard 강한 규칙(강제사항)
| requiredDuringSchedulingIgnoredDuringExecution || hard {{해석|강한 규칙(강제사항)}}
|-
|-
| preferredDuringSchedulingIgnoredDuringExecution || soft 약한 규칙(권장사항)
| preferredDuringSchedulingIgnoredDuringExecution || soft {{해석|약한 규칙(권장사항)}}
|-
|-
| requiredDuringSchedulingRequiredDuringExecution ||  
| requiredDuringSchedulingRequiredDuringExecution ||  

2019년 6월 1일 (토) 22:56 판

1 개요

쿠버네티스 Node Affinity Rules
쿠버네티스 Node 어피니티 규칙
  • 연산자 In, NotIn, Exists, DoesNotExist 사용
requiredDuringSchedulingIgnoredDuringExecution hard → 강한 규칙(강제사항)
preferredDuringSchedulingIgnoredDuringExecution soft → 약한 규칙(권장사항)
requiredDuringSchedulingRequiredDuringExecution

2 예시

{{소스헤더|pod-with-node-affinity.yaml}

apiVersion: v1
kind: Pod
metadata:
  name: with-node-affinity
spec:
  affinity:
    nodeAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
        nodeSelectorTerms:
        - matchExpressions:
          - key: kubernetes.io/e2e-az-name
            operator: In
            values:
            - e2e-az1
            - e2e-az2
      preferredDuringSchedulingIgnoredDuringExecution:
      - weight: 1
        preference:
          matchExpressions:
          - key: another-node-label-key
            operator: In
            values:
            - another-node-label-value
  containers:
  - name: with-node-affinity
    image: k8s.gcr.io/pause:2.0

3 같이 보기

4 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}