eksctl addon aws-ebs-csi-driver setting nodeAffinity

0

Using an eksctl file to setup the EKS cluster and add-ons usually the addon for EBS CSI is like this:

addons:
- name: aws-ebs-csi-driver
  version: latest
  resolveConflicts: overwrite

The eksctl documentation says that is possible to use a field configurationValues: to set custom values in addon deployment.

But the EBS CSI driver has a Deployment ebs-csi-controller in kube-system namespace with the following affinity setup:

      affinity:
        nodeAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - weight: 1
              preference:
                matchExpressions:
                  - key: eks.amazonaws.com/compute-type
                    operator: NotIn
                    values:
                      - fargate
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - weight: 100
              podAffinityTerm:
                labelSelector:
                  matchExpressions:
                    - key: app
                      operator: In
                      values:
                        - ebs-csi-controller
                topologyKey: kubernetes.io/hostname

so the question is if is possible to add a nodeAffinity to complement the default affinity using the field configurationValues: of eksctl file on addons setup, and if yes how to do it?

For the moment the "fix" was done changing direct the Deployment object in the EKS.

The need for this kind of customization is because if you have a specific nodegroup to run core services, like EBS CSI, will be necessary to add a custom affinity to put them (are 2 replicas) on there.

profile picture
질문됨 일 년 전811회 조회
1개 답변
0

You can use the following command to see supported configuration options for EBS CSI driver

aws eks describe-addon-configuration --addon-name aws-ebs-csi-driver --addon-version v1.15.0-eksbuild.1

nodeAffinity is not a supported input value, but nodeSelector is. Is that sufficient for your use case?

AWS
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠