<p>I want to setup an aws-load-balancer-controller on my EKS Cluster. But when it want to start up it shows the following error.</p>
<p><code>  Warning  FailedScheduling  109s  default-scheduler  0/2 nodes are available: 2 node(s) had untolerated taint {eks.amazonaws.com/compute-type: fargate}. preemption: 0/2 nodes are available: 2 Preemption is not helpful for scheduling..</code></p>
<p>After changing the default scheduler to fargate scheduler i got another error.</p>
<p>`Events:
Type     Reason            Age   From               Message</p>
<hr />
<p>Warning  FailedScheduling  39s   fargate-scheduler  Misconfigured Fargate Profile: pod does not have profile label eks.amazonaws.com/fargate-profile`</p>
<p>But the fargate profile seems to be right. Core-DNS is working on Fargate with the same profile in the same namespace.</p>
<p>This is the deployment yaml:</p>
<pre><code># Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: &quot;8&quot;
    meta.helm.sh/release-name: aws-load-balancer-controller
    meta.helm.sh/release-namespace: kube-system
  creationTimestamp: &quot;2023-07-13T10:14:08Z&quot;
  generation: 7
  labels:
    app.kubernetes.io/instance: aws-load-balancer-controller
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: aws-load-balancer-controller
    app.kubernetes.io/version: v2.5.3
    helm.sh/chart: aws-load-balancer-controller-1.5.4
  name: aws-load-balancer-controller
  namespace: kube-system
  resourceVersion: &quot;40259&quot;
  uid: abde0d23-8759-45a9-8bf9-a53089ec567f
spec:
  progressDeadlineSeconds: 600
  replicas: 2
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app.kubernetes.io/instance: aws-load-balancer-controller
      app.kubernetes.io/name: aws-load-balancer-controller
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      annotations:
        kubectl.kubernetes.io/restartedAt: &quot;2023-07-13T14:38:36+02:00&quot;
        prometheus.io/port: &quot;8080&quot;
        prometheus.io/scrape: &quot;true&quot;
      creationTimestamp: null
      labels:
        app.kubernetes.io/instance: aws-load-balancer-controller
        app.kubernetes.io/name: aws-load-balancer-controller
    spec:
      affinity:
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
          - podAffinityTerm:
              labelSelector:
                matchExpressions:
                - key: app.kubernetes.io/name
                  operator: In
                  values:
                  - aws-load-balancer-controller
              topologyKey: kubernetes.io/hostname
            weight: 100
      containers:
      - args:
        - --cluster-name=dsa-ph-dev-cluster
        - --ingress-class=alb
        image: public.ecr.aws/eks/aws-load-balancer-controller:v2.5.3
        imagePullPolicy: IfNotPresent
        livenessProbe:
          failureThreshold: 2
          httpGet:
            path: /healthz
            port: 61779
            scheme: HTTP
          initialDelaySeconds: 30
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 10
        name: aws-load-balancer-controller
        ports:
        - containerPort: 9443
          name: webhook-server
          protocol: TCP
        - containerPort: 8080
          name: metrics-server
          protocol: TCP
        resources: {}
        securityContext:
          allowPrivilegeEscalation: false
          readOnlyRootFilesystem: true
          runAsNonRoot: true
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /tmp/k8s-webhook-server/serving-certs
          name: cert
          readOnly: true
      dnsPolicy: ClusterFirst
      priorityClassName: system-cluster-critical
      restartPolicy: Always
      schedulerName: fargate-scheduler
      securityContext:
        fsGroup: 65534
      serviceAccount: aws-load-balancer-controller
      serviceAccountName: aws-load-balancer-controller
      terminationGracePeriodSeconds: 10
      volumes:
      - name: cert
        secret:
          defaultMode: 420
          secretName: aws-load-balancer-tls
status:
  collisionCount: 1
  conditions:
  - lastTransitionTime: &quot;2023-07-13T10:14:08Z&quot;
    lastUpdateTime: &quot;2023-07-13T10:14:08Z&quot;
    message: Deployment does not have minimum availability.
    reason: MinimumReplicasUnavailable
    status: &quot;False&quot;
    type: Available
  - lastTransitionTime: &quot;2023-07-13T12:48:38Z&quot;
    lastUpdateTime: &quot;2023-07-13T12:48:38Z&quot;
    message: ReplicaSet &quot;aws-load-balancer-controller-8dcdd998d&quot; has timed out progressing.
    reason: ProgressDeadlineExceeded
    status: &quot;False&quot;
    type: Progressing
  observedGeneration: 7
  replicas: 3
  unavailableReplicas: 3
  updatedReplicas: 1
</code></pre>
<p>Had someone had this error before?</p>
<p>Thanks.</p>

heartsaver
<p>A Fargate profile has a selector, e.g. a namespace, label, or both. If you want to run an application with Fargate, it needs a matching selector. For example, if your Fargate profile has a namespace selector for a namespace called Fargate, all pods deployed to that namespace will run as Fargate pods. Your deployment is trying to deploy the load balancer controller into the kube-system namespace. Is your Fargate profile configured to use kube-system as its namespace selector? The error appears to indicate that a label, <code>eks.amazonaws.com/fargate-profile</code>, is missing from your pod.</p>
