<p>I have followed the AWS official document to create an ALB controller and made sure few things like providing aws region and vpc id when creating a controller.</p>
<p><a href="https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html</a></p>
<p>However I notice the below error in the ALB contoller pod logs. I am running the controller pods and other resources in Fargate nodes with AKS running on version 1.21.0</p>
<blockquote>
<p>{&quot;level&quot;:&quot;error&quot;,&quot;ts&quot;:1643650856.9675832,&quot;logger&quot;:&quot;controller-runtime.manager.controller.ingress&quot;,&quot;msg&quot;:&quot;Reconciler error&quot;,&quot;name&quot;:&quot;app-ingress&quot;,&quot;namespace&quot;:&quot;backend&quot;,&quot;error&quot;:&quot;WebIdentityErr: failed to retrieve credentials\ncaused by: RequestError: send request failed\ncaused by: Post &quot;https://sts.us-east-1.amazonaws.com/&quot;: dial tcp: i/o timeout&quot;}</p>
</blockquote>

Vaishnav
<p>According to your error it looks like your coreDNS setup is not correct.</p>
<blockquote>
<p>By default, CoreDNS is configured to run on Amazon EC2 infrastructure on Amazon EKS clusters. If you want to <em>only</em> run your pods on Fargate in your cluster, complete the following steps.</p>
</blockquote>
<ol>
<li>Create a Fargate profile for CoreDNS.</li>
</ol>
<pre><code>aws eks create-fargate-profile \
    --fargate-profile-name coredns \
    --cluster-name [your cluster name] \
    --pod-execution-role-arn arn:aws:iam::[your account ID]:role/AmazonEKSFargatePodExecutionRole \
    --selectors namespace=kube-system,labels={k8s-app=kube-dns} \
    --subnets subnet-[1st ID of your private subnet] subnet-[2nd ID of your private subnet] subnet-[3rd ID of your private subnet]
</code></pre>
<p>Replace <code>AmazonEKSFargatePodExecutionRole</code> with the name of your pod execution role. If you don't have a pod execution role, you must <a href="https://docs.aws.amazon.com/eks/latest/userguide/fargate-getting-started.html#fargate-sg-pod-execution-role" rel="nofollow noreferrer">create one</a> first.</p>
<blockquote>
<p><strong>NOTE</strong>
The format of the role ARN must be <code>arn:aws:iam::`111122223333`:role/`role-name` </code>.</p>
</blockquote>
<ol start="2">
<li>Following command removes the <code>eks.amazonaws.com/compute-type : ec2</code> annotation from the CoreDNS pods, run it:</li>
</ol>
<pre class="lang-yaml prettyprint-override"><code>kubectl patch deployment coredns \
    -n kube-system \
    --type json \
    -p='[{&quot;op&quot;: &quot;remove&quot;, &quot;path&quot;: &quot;/spec/template/metadata/annotations/eks.amazonaws.com~1compute-type&quot;}]'
</code></pre>
<p><a href="https://docs.aws.amazon.com/eks/latest/userguide/fargate-getting-started.html" rel="nofollow noreferrer">Here is a link to the documentation</a>.</p>
