ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • hdfs-k8s helm deploy
    Kubernetes 2019. 11. 4. 17:57

    zookeeper 변경

    datanode, namenode { statefulset, deployment, daemonset : apiversion change }

    spec.selector.matchLabels.app = spec.template.metadata.labels.app 작성

     

    Master node Taint

     

    Taints / Tolerations ?

     

    Kubernetes Node에는 Taint 설정을 통해 해당 노드에 Pod가 할당 또는 실행되는 것을 막을 수 있다. 하지만 Pod의 정의에 Toleration을 설정하면 Taint 설정되어 있는 노드에도 Pod를 할당할 수 있다. Master 노드는 기본적으로 Taint 설정이 되어 있다.

    Kubectl describe node master 명령어 입력시 출력

    yaml file에서 spec.tolerations 항목에 node-role.kubernetes.io/master 라는 키로 설정된 NoSchedule 효과를 Toleration하겠다는 설정 시 master node에 pod을 할당하는 것이 가능하다. Toleration 설정을 했다고 taint 설정되어 있는 노드에 Pod가 할당되는 것이 아니라 taint 설정되어 있는 노드 또한 할당 가능한 노드로서 선정된다는 의미이다.

     

    Taints / Toleration 기본 사용 방법

    $ kubectl taint nodes <NODE_NAME> key=value:NoSchedule
    // key-value라는 키와 값으로 NoSchedule 설정
    
    $ kubectl taint nodes <NODE_NAME> key:NoSchedule
    // key라는 키의 NoSchedule Taints 해제

    container spec에서 spec.tolerations 의 구성은 "key", "operator", "value", "effect" 로 되어있다. effect에는 NoSchedule 외에도 NoExecute, PreferNoSchedule를 사용할 수 있다.

     

    PreferNoSchedule은 NoSchedule과 거의 동일한 기능을 하지만 NoSchedule에 비해 다소 가벼운 제한이기 때문에, 여러 이유로 인해 결국 Pod이 할당 될 수 있다.

    NoExecute는 NoSchedule과 다른 기능을 한다. 이미 Pod가 할당된 노드에 대해 NoSchedule을 설정하더라도 실행 중인 Pod는 계속 실행되지만, NoExecute를 설정할 경우 기존에 실행 중인 Pod가 종료된 뒤 다른 노드에 할당되게 된다.

     

     

    Master Node에 namenode 할당하기

     

     

    'Kubernetes' 카테고리의 다른 글

    Kubernetes Host Network Configuration  (0) 2019.11.14
    Kubernetes TCP Load Balancer  (0) 2019.11.08
    Helm Charts  (0) 2019.11.01
    Kubernetes Persistent Volume  (0) 2019.10.08
    Kubernetes GPU Container  (0) 2019.10.02

    댓글

Designed by Tistory.