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

(새 문서: ==개요== ;쿠버네티스 tolerations <source lang='yaml'> spec: nodeSelector: node-role.kubernetes.io/master: "" tolerations: - effect: NoSchedule operator: Exists <...)
 
 
(사용자 2명의 중간 판 6개는 보이지 않습니다)
1번째 줄: 1번째 줄:
==개요==
==개요==
;쿠버네티스 tolerations
;쿠버네티스 tolerations
;k8s 톨러레이션


<source lang='yaml'>
<syntaxhighlight lang='yaml'>
spec:
spec:
   nodeSelector:
   nodeSelector:
9번째 줄: 10번째 줄:
   - effect: NoSchedule
   - effect: NoSchedule
     operator: Exists
     operator: Exists
</source>
</syntaxhighlight>
<source lang='yaml'>
<syntaxhighlight lang='yaml'>
spec:
spec:
   nodeSelector:
   nodeSelector:
17번째 줄: 18번째 줄:
   - effect: NoSchedule
   - effect: NoSchedule
     key: node-role.kubernetes.io/master
     key: node-role.kubernetes.io/master
</source>
</syntaxhighlight>
 
==Pod 예시==
<syntaxhighlight lang='yaml' highlight='11-14'>
apiVersion: v1
kind: Pod
metadata:
  name: nginx
  labels:
    env: test
spec:
  containers:
  - name: nginx
    image: nginx
  tolerations:
  - key: "example-key"
    operator: "Exists"
    effect: "NoSchedule"
# https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/#concepts
</syntaxhighlight>
 
==Deployment 예시==
<syntaxhighlight lang='yaml' highlight='18-20'>
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
spec:
  selector:
    matchLabels:
      app: nginx
  replicas: 10
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx
      tolerations:
      - effect: NoSchedule
        operator: Exists
# https://github.com/infracloudio/kubernetes-scheduling-examples/blob/1531d18c402d82a47415d08f99c6c60f4c2f7608/taints/deployment-toleration.yaml
</syntaxhighlight>


==같이 보기==
==같이 보기==

2021년 9월 30일 (목) 14:15 기준 최신판

1 개요[ | ]

쿠버네티스 tolerations
k8s 톨러레이션
spec:
  nodeSelector:
    node-role.kubernetes.io/master: ""
  tolerations:
  - effect: NoSchedule
    operator: Exists
spec:
  nodeSelector:
    node-role.kubernetes.io/master: ""
  tolerations:
  - effect: NoSchedule
    key: node-role.kubernetes.io/master

2 Pod 예시[ | ]

apiVersion: v1
kind: Pod
metadata:
  name: nginx
  labels:
    env: test
spec:
  containers:
  - name: nginx
    image: nginx
  tolerations:
  - key: "example-key"
    operator: "Exists"
    effect: "NoSchedule"
# https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/#concepts

3 Deployment 예시[ | ]

apiVersion: apps/v1 
kind: Deployment
metadata:
  name: nginx-deployment
spec:
  selector:
    matchLabels:
      app: nginx
  replicas: 10
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx
      tolerations:
      - effect: NoSchedule
        operator: Exists
# https://github.com/infracloudio/kubernetes-scheduling-examples/blob/1531d18c402d82a47415d08f99c6c60f4c2f7608/taints/deployment-toleration.yaml

4 같이 보기[ | ]

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