LoginSignup
0
0

NodeにTaintsがついている場合、Datadog DaemonSetにTolerationsを忘れないでね!

Posted at

マネージド型k8sのDaemonSet

EKSなどのKubernetesマネージドサービスは、DaemonSetを介してNodeにkube-proxy, ebs csi, cniなどのPodを適切に配置してくれます。

k8sドキュメントに記載している自動的に追加されるTolerations以外で、ワイルドカードのTolerationsもデフォルトで入っています。

tolerations:                       
- operator: Exists

EKS管轄外のDaemonSet

しかし、DatadogなどEKS外でデプロイされたDaemonSet Podsを入れる際に、TaintsがついているNodeにPodがスケジューリングされないため、注意が必要です。
解決方法としては、ドキュメントに書かれているように

You can add your own tolerations to the Pods of a DaemonSet as well, by defining these in the Pod template of the DaemonSet.

DaemonSetのPodテンプレートにtolerationsを定義することです。

tolerations:                       
- operator: Exists

また、このようなワイルドカードのTolerationsを追加するのは便利かもしれないですが、(EKSの場合)Fargateにスケジューリングされてしまうので、Affinityもちゃんと書きましょう

affinity:                               
  nodeAffinity:
    requiredDuringSchedulingIgnoredDuringExecution:
      nodeSelectorTerms:
        - matchExpressions:
          - key: eks.amazonaws.com/compute-type
            operator: NotIn              
            values:
              - fargat

余談ですが、同じくDaemonSet介してデプロイされるfluent bitでは、不必要なTolerationsによるバグが過去起きていました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0