<p>I originally posted this question as an issue on the GitHub project for the AWS Load Balancer Controller here: <a href="https://github.com/kubernetes-sigs/aws-load-balancer-controller/issues/2069" rel="nofollow noreferrer">https://github.com/kubernetes-sigs/aws-load-balancer-controller/issues/2069</a>.</p>
<p>I'm seeing some odd behavior that I can't trace or explain when trying to get the loadBalacnerDnsName from an ALB created by the controller. I'm using v2.2.0 of the AWS Load Balancer Controller in a CDK project. The ingress that I deploy triggers the provisioning of an ALB, and that ALB can connect to my K8s workloads running in EKS.</p>
<p>Here's my problem: I'm trying to automate the creation of a Route53 A Record that points to the <code>loadBalancerDnsName</code> of the load balancer, but the <code>loadBalancerDnsName</code> that I get in my CDK script is not the same as the <code>loadBalancerDnsName</code> that shows up in the AWS console once my stack has finished deploying. The value in the console is correct and I can get a response from that URL. My CDK script outputs the value of the DnsName as a CfnOutput value, but that URL does not point to anything.</p>
<p>In CDK, I have tried to use <code>KubernetesObjectValue</code> to get the DNS name from the load balancer. This isn't working (see this related issue: <a href="https://github.com/aws/aws-cdk/issues/14933" rel="nofollow noreferrer">https://github.com/aws/aws-cdk/issues/14933</a>), so I'm trying to lookup the Load Balancer with CDK's <code>.fromLookup</code> and using a tag that I added through my ingress annotation:</p>
<pre class="lang-js prettyprint-override"><code>    const alb = elbv2.ApplicationLoadBalancer.fromLookup(this, 'appAlb', {
      loadBalancerTags: {
        Environment: 'test',
      },
    });
</code></pre>
<p>Here's the project in which I'm running into this issue: <a href="https://github.com/briancaffey/django-cdk" rel="nofollow noreferrer">https://github.com/briancaffey/django-cdk</a></p>
<p>Here are some relevant files:</p>
<p>Installing the AWS Load Balancer Controller with CDK: <a href="https://github.com/briancaffey/django-cdk/blob/main/src/eks/awslbc/index.ts" rel="nofollow noreferrer">https://github.com/briancaffey/django-cdk/blob/main/src/eks/awslbc/index.ts</a></p>
<p>Ingress object definition:
<a href="https://github.com/briancaffey/django-cdk/tree/main/src/eks/resources/ingress" rel="nofollow noreferrer">https://github.com/briancaffey/django-cdk/tree/main/src/eks/resources/ingress</a></p>
<p>ALB <code>fromLookup</code> method that is generating the wrong DnsName:
<a href="https://github.com/briancaffey/django-cdk/blob/main/src/django-eks.ts#L297" rel="nofollow noreferrer">https://github.com/briancaffey/django-cdk/blob/main/src/django-eks.ts#L297</a></p>
<p>Does anyone have any ideas about what could be causing this or how I can debug? If there is any other information that would be helpful to collect in my debugging process, please let me know.</p>
<p>I'm not sure if this is possible, but it seems like the Load Balancer might be created, assigned a DnsName, and then maybe fails provisioning at some point and tries to create another ALB that with another DnsName that is successful.</p>
<p><strong>Update</strong>: Here are logs from the AWS Load Balancer Controller deployment:</p>
<pre><code>~/git/github/django-cdk$ kubectl logs deployment/goeksstackdjangoekssamplealbingresscontroller48a16415-aws-load -n kube-system
</code></pre>
<pre><code>Found 2 pods, using pod/goeksstackdjangoekssamplealbingresscontroller48a16415-aws-c6d8h
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379830.094481,&quot;msg&quot;:&quot;version&quot;,&quot;GitVersion&quot;:&quot;v2.2.0&quot;,&quot;GitCommit&quot;:&quot;68c417a7ea37ff153f053d9ffef1cc5c70d7e211&quot;,&quot;BuildDate&quot;:&quot;2021-05-14T21:49:05+0000&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379830.1275837,&quot;logger&quot;:&quot;controller-runtime.metrics&quot;,&quot;msg&quot;:&quot;metrics server is starting to listen&quot;,&quot;addr&quot;:&quot;:8080&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379830.1310954,&quot;logger&quot;:&quot;setup&quot;,&quot;msg&quot;:&quot;adding health check for controller&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379830.1312613,&quot;logger&quot;:&quot;controller-runtime.webhook&quot;,&quot;msg&quot;:&quot;registering webhook&quot;,&quot;path&quot;:&quot;/mutate-v1-pod&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379830.131368,&quot;logger&quot;:&quot;controller-runtime.webhook&quot;,&quot;msg&quot;:&quot;registering webhook&quot;,&quot;path&quot;:&quot;/mutate-elbv2-k8s-aws-v1beta1-targetgroupbinding&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379830.131444,&quot;logger&quot;:&quot;controller-runtime.webhook&quot;,&quot;msg&quot;:&quot;registering webhook&quot;,&quot;path&quot;:&quot;/validate-elbv2-k8s-aws-v1beta1-targetgroupbinding&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379830.1315207,&quot;logger&quot;:&quot;controller-runtime.webhook&quot;,&quot;msg&quot;:&quot;registering webhook&quot;,&quot;path&quot;:&quot;/validate-networking-v1beta1-ingress&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379830.1316643,&quot;logger&quot;:&quot;setup&quot;,&quot;msg&quot;:&quot;starting podInfo repo&quot;}
I0611 02:50:32.131767       1 leaderelection.go:242] attempting to acquire leader lease  kube-system/aws-load-balancer-controller-leader...
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379832.1318467,&quot;logger&quot;:&quot;controller-runtime.manager&quot;,&quot;msg&quot;:&quot;starting metrics server&quot;,&quot;path&quot;:&quot;/metrics&quot;}
I0611 02:50:32.150030       1 leaderelection.go:252] successfully acquired lease kube-system/aws-load-balancer-controller-leader
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379832.2321155,&quot;logger&quot;:&quot;controller-runtime.webhook.webhooks&quot;,&quot;msg&quot;:&quot;starting webhook server&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379832.2321231,&quot;logger&quot;:&quot;controller&quot;,&quot;msg&quot;:&quot;Starting EventSource&quot;,&quot;reconcilerGroup&quot;:&quot;elbv2.k8s.aws&quot;,&quot;reconcilerKind&quot;:&quot;TargetGroupBinding&quot;,&quot;controller&quot;:&quot;targetGroupBinding&quot;,&quot;source&quot;:&quot;kind source: /, Kind=&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379832.2321854,&quot;logger&quot;:&quot;controller&quot;,&quot;msg&quot;:&quot;Starting EventSource&quot;,&quot;reconcilerGroup&quot;:&quot;elbv2.k8s.aws&quot;,&quot;reconcilerKind&quot;:&quot;TargetGroupBinding&quot;,&quot;controller&quot;:&quot;targetGroupBinding&quot;,&quot;source&quot;:&quot;kind source: /, Kind=&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379832.2322075,&quot;logger&quot;:&quot;controller&quot;,&quot;msg&quot;:&quot;Starting EventSource&quot;,&quot;reconcilerGroup&quot;:&quot;elbv2.k8s.aws&quot;,&quot;reconcilerKind&quot;:&quot;TargetGroupBinding&quot;,&quot;controller&quot;:&quot;targetGroupBinding&quot;,&quot;source&quot;:&quot;kind source: /, Kind=&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379832.2323742,&quot;logger&quot;:&quot;controller&quot;,&quot;msg&quot;:&quot;Starting EventSource&quot;,&quot;controller&quot;:&quot;ingress&quot;,&quot;source&quot;:&quot;channel source: 0xc00053a820&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379832.2324347,&quot;logger&quot;:&quot;controller&quot;,&quot;msg&quot;:&quot;Starting EventSource&quot;,&quot;controller&quot;:&quot;ingress&quot;,&quot;source&quot;:&quot;channel source: 0xc00053a870&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379832.2324626,&quot;logger&quot;:&quot;controller&quot;,&quot;msg&quot;:&quot;Starting EventSource&quot;,&quot;controller&quot;:&quot;ingress&quot;,&quot;source&quot;:&quot;kind source: /, Kind=&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379832.2324827,&quot;logger&quot;:&quot;controller&quot;,&quot;msg&quot;:&quot;Starting EventSource&quot;,&quot;controller&quot;:&quot;ingress&quot;,&quot;source&quot;:&quot;kind source: /, Kind=&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379832.2325017,&quot;logger&quot;:&quot;controller&quot;,&quot;msg&quot;:&quot;Starting EventSource&quot;,&quot;controller&quot;:&quot;ingress&quot;,&quot;source&quot;:&quot;kind source: /, Kind=&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379832.232624,&quot;logger&quot;:&quot;controller&quot;,&quot;msg&quot;:&quot;Starting EventSource&quot;,&quot;controller&quot;:&quot;service&quot;,&quot;source&quot;:&quot;kind source: /, Kind=&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379832.2326622,&quot;logger&quot;:&quot;controller&quot;,&quot;msg&quot;:&quot;Starting Controller&quot;,&quot;controller&quot;:&quot;service&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379832.232741,&quot;logger&quot;:&quot;controller-runtime.certwatcher&quot;,&quot;msg&quot;:&quot;Updated current TLS certificate&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379832.2328286,&quot;logger&quot;:&quot;controller-runtime.webhook&quot;,&quot;msg&quot;:&quot;serving webhook server&quot;,&quot;host&quot;:&quot;&quot;,&quot;port&quot;:9443}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379832.2332337,&quot;logger&quot;:&quot;controller-runtime.certwatcher&quot;,&quot;msg&quot;:&quot;Starting certificate watcher&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379832.3324778,&quot;logger&quot;:&quot;controller&quot;,&quot;msg&quot;:&quot;Starting EventSource&quot;,&quot;reconcilerGroup&quot;:&quot;elbv2.k8s.aws&quot;,&quot;reconcilerKind&quot;:&quot;TargetGroupBinding&quot;,&quot;controller&quot;:&quot;targetGroupBinding&quot;,&quot;source&quot;:&quot;kind source: /, Kind=&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379832.3327508,&quot;logger&quot;:&quot;controller&quot;,&quot;msg&quot;:&quot;Starting workers&quot;,&quot;controller&quot;:&quot;service&quot;,&quot;worker count&quot;:3}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379832.332836,&quot;logger&quot;:&quot;controller&quot;,&quot;msg&quot;:&quot;Starting EventSource&quot;,&quot;controller&quot;:&quot;ingress&quot;,&quot;source&quot;:&quot;channel source: 0xc00053a8c0&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379832.3328674,&quot;logger&quot;:&quot;controller&quot;,&quot;msg&quot;:&quot;Starting EventSource&quot;,&quot;controller&quot;:&quot;ingress&quot;,&quot;source&quot;:&quot;kind source: /, Kind=&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379832.4330835,&quot;logger&quot;:&quot;controller&quot;,&quot;msg&quot;:&quot;Starting Controller&quot;,&quot;reconcilerGroup&quot;:&quot;elbv2.k8s.aws&quot;,&quot;reconcilerKind&quot;:&quot;TargetGroupBinding&quot;,&quot;controller&quot;:&quot;targetGroupBinding&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379832.4333706,&quot;logger&quot;:&quot;controller&quot;,&quot;msg&quot;:&quot;Starting workers&quot;,&quot;reconcilerGroup&quot;:&quot;elbv2.k8s.aws&quot;,&quot;reconcilerKind&quot;:&quot;TargetGroupBinding&quot;,&quot;controller&quot;:&quot;targetGroupBinding&quot;,&quot;worker count&quot;:3}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379832.433311,&quot;logger&quot;:&quot;controller&quot;,&quot;msg&quot;:&quot;Starting EventSource&quot;,&quot;controller&quot;:&quot;ingress&quot;,&quot;source&quot;:&quot;kind source: /, Kind=&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379832.4334028,&quot;logger&quot;:&quot;controller&quot;,&quot;msg&quot;:&quot;Starting Controller&quot;,&quot;controller&quot;:&quot;ingress&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379832.433451,&quot;logger&quot;:&quot;controller&quot;,&quot;msg&quot;:&quot;Starting workers&quot;,&quot;controller&quot;:&quot;ingress&quot;,&quot;worker count&quot;:3}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379851.8822243,&quot;logger&quot;:&quot;controllers.ingress&quot;,&quot;msg&quot;:&quot;successfully built model&quot;,&quot;model&quot;:&quot;{\&quot;id\&quot;:\&quot;app/app-ingress\&quot;,\&quot;resources\&quot;:{\&quot;AWS::EC2::SecurityGroup\&quot;:{\&quot;ManagedLBSecurityGroup\&quot;:{\&quot;spec\&quot;:{\&quot;groupName\&quot;:\&quot;k8s-app-appingre-64b5836d2b\&quot;,\&quot;description\&quot;:\&quot;[k8s] Managed SecurityGroup for LoadBalancer\&quot;,\&quot;tags\&quot;:{\&quot;Environment\&quot;:\&quot;test\&quot;},\&quot;ingress\&quot;:[{\&quot;ipProtocol\&quot;:\&quot;tcp\&quot;,\&quot;fromPort\&quot;:80,\&quot;toPort\&quot;:80,\&quot;ipRanges\&quot;:[{\&quot;cidrIP\&quot;:\&quot;0.0.0.0/0\&quot;}]}]}}},\&quot;AWS::ElasticLoadBalancingV2::Listener\&quot;:{\&quot;80\&quot;:{\&quot;spec\&quot;:{\&quot;loadBalancerARN\&quot;:{\&quot;$ref\&quot;:\&quot;#/resources/AWS::ElasticLoadBalancingV2::LoadBalancer/LoadBalancer/status/loadBalancerARN\&quot;},\&quot;port\&quot;:80,\&quot;protocol\&quot;:\&quot;HTTP\&quot;,\&quot;defaultActions\&quot;:[{\&quot;type\&quot;:\&quot;fixed-response\&quot;,\&quot;fixedResponseConfig\&quot;:{\&quot;contentType\&quot;:\&quot;text/plain\&quot;,\&quot;statusCode\&quot;:\&quot;404\&quot;}}],\&quot;tags\&quot;:{\&quot;Environment\&quot;:\&quot;test\&quot;}}}},\&quot;AWS::ElasticLoadBalancingV2::ListenerRule\&quot;:{\&quot;80:1\&quot;:{\&quot;spec\&quot;:{\&quot;listenerARN\&quot;:{\&quot;$ref\&quot;:\&quot;#/resources/AWS::ElasticLoadBalancingV2::Listener/80/status/listenerARN\&quot;},\&quot;priority\&quot;:1,\&quot;actions\&quot;:[{\&quot;type\&quot;:\&quot;forward\&quot;,\&quot;forwardConfig\&quot;:{\&quot;targetGroups\&quot;:[{\&quot;targetGroupARN\&quot;:{\&quot;$ref\&quot;:\&quot;#/resources/AWS::ElasticLoadBalancingV2::TargetGroup/app/app-ingress-api-http:80/status/targetGroupARN\&quot;}}]}}],\&quot;conditions\&quot;:[{\&quot;field\&quot;:\&quot;path-pattern\&quot;,\&quot;pathPatternConfig\&quot;:{\&quot;values\&quot;:[\&quot;/*\&quot;]}}],\&quot;tags\&quot;:{\&quot;Environment\&quot;:\&quot;test\&quot;}}}},\&quot;AWS::ElasticLoadBalancingV2::LoadBalancer\&quot;:{\&quot;LoadBalancer\&quot;:{\&quot;spec\&quot;:{\&quot;name\&quot;:\&quot;k8s-app-appingre-df49e963f5\&quot;,\&quot;type\&quot;:\&quot;application\&quot;,\&quot;scheme\&quot;:\&quot;internet-facing\&quot;,\&quot;ipAddressType\&quot;:\&quot;ipv4\&quot;,\&quot;subnetMapping\&quot;:[{\&quot;subnetID\&quot;:\&quot;subnet-0257383f56bbc4810\&quot;},{\&quot;subnetID\&quot;:\&quot;subnet-0b8b2e282788f64bc\&quot;}],\&quot;securityGroups\&quot;:[{\&quot;$ref\&quot;:\&quot;#/resources/AWS::EC2::SecurityGroup/ManagedLBSecurityGroup/status/groupID\&quot;}],\&quot;tags\&quot;:{\&quot;Environment\&quot;:\&quot;test\&quot;}}}},\&quot;AWS::ElasticLoadBalancingV2::TargetGroup\&quot;:{\&quot;app/app-ingress-api-http:80\&quot;:{\&quot;spec\&quot;:{\&quot;name\&quot;:\&quot;k8s-app-apihttp-ee37d33f98\&quot;,\&quot;targetType\&quot;:\&quot;instance\&quot;,\&quot;port\&quot;:30867,\&quot;protocol\&quot;:\&quot;HTTP\&quot;,\&quot;protocolVersion\&quot;:\&quot;HTTP1\&quot;,\&quot;healthCheckConfig\&quot;:{\&quot;port\&quot;:\&quot;traffic-port\&quot;,\&quot;protocol\&quot;:\&quot;HTTP\&quot;,\&quot;path\&quot;:\&quot;/\&quot;,\&quot;matcher\&quot;:{\&quot;httpCode\&quot;:\&quot;200\&quot;},\&quot;intervalSeconds\&quot;:15,\&quot;timeoutSeconds\&quot;:5,\&quot;healthyThresholdCount\&quot;:2,\&quot;unhealthyThresholdCount\&quot;:2},\&quot;tags\&quot;:{\&quot;Environment\&quot;:\&quot;test\&quot;}}}},\&quot;K8S::ElasticLoadBalancingV2::TargetGroupBinding\&quot;:{\&quot;app/app-ingress-api-http:80\&quot;:{\&quot;spec\&quot;:{\&quot;template\&quot;:{\&quot;metadata\&quot;:{\&quot;name\&quot;:\&quot;k8s-app-apihttp-ee37d33f98\&quot;,\&quot;namespace\&quot;:\&quot;app\&quot;,\&quot;creationTimestamp\&quot;:null},\&quot;spec\&quot;:{\&quot;targetGroupARN\&quot;:{\&quot;$ref\&quot;:\&quot;#/resources/AWS::ElasticLoadBalancingV2::TargetGroup/app/app-ingress-api-http:80/status/targetGroupARN\&quot;},\&quot;targetType\&quot;:\&quot;instance\&quot;,\&quot;serviceRef\&quot;:{\&quot;name\&quot;:\&quot;api-http\&quot;,\&quot;port\&quot;:80},\&quot;networking\&quot;:{\&quot;ingress\&quot;:[{\&quot;from\&quot;:[{\&quot;securityGroup\&quot;:{\&quot;groupID\&quot;:{\&quot;$ref\&quot;:\&quot;#/resources/AWS::EC2::SecurityGroup/ManagedLBSecurityGroup/status/groupID\&quot;}}}],\&quot;ports\&quot;:[{\&quot;protocol\&quot;:\&quot;TCP\&quot;}]}]}}}}}}}}&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379852.083325,&quot;logger&quot;:&quot;controllers.ingress&quot;,&quot;msg&quot;:&quot;creating securityGroup&quot;,&quot;resourceID&quot;:&quot;ManagedLBSecurityGroup&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379852.2566178,&quot;logger&quot;:&quot;controllers.ingress&quot;,&quot;msg&quot;:&quot;created securityGroup&quot;,&quot;resourceID&quot;:&quot;ManagedLBSecurityGroup&quot;,&quot;securityGroupID&quot;:&quot;sg-080bffd697dc0ab27&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379852.4109924,&quot;msg&quot;:&quot;authorizing securityGroup ingress&quot;,&quot;securityGroupID&quot;:&quot;sg-080bffd697dc0ab27&quot;,&quot;permission&quot;:[{&quot;FromPort&quot;:80,&quot;IpProtocol&quot;:&quot;tcp&quot;,&quot;IpRanges&quot;:[{&quot;CidrIp&quot;:&quot;0.0.0.0/0&quot;,&quot;Description&quot;:&quot;&quot;}],&quot;Ipv6Ranges&quot;:null,&quot;PrefixListIds&quot;:null,&quot;ToPort&quot;:80,&quot;UserIdGroupPairs&quot;:null}]}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379852.5575335,&quot;msg&quot;:&quot;authorized securityGroup ingress&quot;,&quot;securityGroupID&quot;:&quot;sg-080bffd697dc0ab27&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379852.6474898,&quot;logger&quot;:&quot;controllers.ingress&quot;,&quot;msg&quot;:&quot;creating targetGroup&quot;,&quot;stackID&quot;:&quot;app/app-ingress&quot;,&quot;resourceID&quot;:&quot;app/app-ingress-api-http:80&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379852.9693868,&quot;logger&quot;:&quot;controllers.ingress&quot;,&quot;msg&quot;:&quot;created targetGroup&quot;,&quot;stackID&quot;:&quot;app/app-ingress&quot;,&quot;resourceID&quot;:&quot;app/app-ingress-api-http:80&quot;,&quot;arn&quot;:&quot;arn:aws:elasticloadbalancing:us-east-1:111111111111:targetgroup/k8s-app-apihttp-ee37d33f98/8e8cf427880a005f&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379853.0108032,&quot;logger&quot;:&quot;controllers.ingress&quot;,&quot;msg&quot;:&quot;creating loadBalancer&quot;,&quot;stackID&quot;:&quot;app/app-ingress&quot;,&quot;resourceID&quot;:&quot;LoadBalancer&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379853.6124952,&quot;logger&quot;:&quot;controllers.ingress&quot;,&quot;msg&quot;:&quot;created loadBalancer&quot;,&quot;stackID&quot;:&quot;app/app-ingress&quot;,&quot;resourceID&quot;:&quot;LoadBalancer&quot;,&quot;arn&quot;:&quot;arn:aws:elasticloadbalancing:us-east-1:111111111111:loadbalancer/app/k8s-app-appingre-df49e963f5/e1e08ff54e34da78&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379853.6379986,&quot;logger&quot;:&quot;controllers.ingress&quot;,&quot;msg&quot;:&quot;creating listener&quot;,&quot;stackID&quot;:&quot;app/app-ingress&quot;,&quot;resourceID&quot;:&quot;80&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379853.7017045,&quot;logger&quot;:&quot;controllers.ingress&quot;,&quot;msg&quot;:&quot;created listener&quot;,&quot;stackID&quot;:&quot;app/app-ingress&quot;,&quot;resourceID&quot;:&quot;80&quot;,&quot;arn&quot;:&quot;arn:aws:elasticloadbalancing:us-east-1:111111111111:listener/app/k8s-app-appingre-df49e963f5/e1e08ff54e34da78/7896e4ee12889f1d&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379853.7323081,&quot;logger&quot;:&quot;controllers.ingress&quot;,&quot;msg&quot;:&quot;creating listener rule&quot;,&quot;stackID&quot;:&quot;app/app-ingress&quot;,&quot;resourceID&quot;:&quot;80:1&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379853.7993383,&quot;logger&quot;:&quot;controllers.ingress&quot;,&quot;msg&quot;:&quot;created listener rule&quot;,&quot;stackID&quot;:&quot;app/app-ingress&quot;,&quot;resourceID&quot;:&quot;80:1&quot;,&quot;arn&quot;:&quot;arn:aws:elasticloadbalancing:us-east-1:111111111111:listener-rule/app/k8s-app-appingre-df49e963f5/e1e08ff54e34da78/7896e4ee12889f1d/2fc270d382a475d1&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379853.7995286,&quot;logger&quot;:&quot;controllers.ingress&quot;,&quot;msg&quot;:&quot;creating targetGroupBinding&quot;,&quot;stackID&quot;:&quot;app/app-ingress&quot;,&quot;resourceID&quot;:&quot;app/app-ingress-api-http:80&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379853.836185,&quot;logger&quot;:&quot;controllers.ingress&quot;,&quot;msg&quot;:&quot;created targetGroupBinding&quot;,&quot;stackID&quot;:&quot;app/app-ingress&quot;,&quot;resourceID&quot;:&quot;app/app-ingress-api-http:80&quot;,&quot;targetGroupBinding&quot;:{&quot;namespace&quot;:&quot;app&quot;,&quot;name&quot;:&quot;k8s-app-apihttp-ee37d33f98&quot;}}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379853.989902,&quot;logger&quot;:&quot;controllers.ingress&quot;,&quot;msg&quot;:&quot;successfully deployed model&quot;,&quot;ingressGroup&quot;:&quot;app/app-ingress&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379854.0531545,&quot;msg&quot;:&quot;authorizing securityGroup ingress&quot;,&quot;securityGroupID&quot;:&quot;sg-03aa126eb1aaeacc5&quot;,&quot;permission&quot;:[{&quot;FromPort&quot;:0,&quot;IpProtocol&quot;:&quot;tcp&quot;,&quot;IpRanges&quot;:null,&quot;Ipv6Ranges&quot;:null,&quot;PrefixListIds&quot;:null,&quot;ToPort&quot;:65535,&quot;UserIdGroupPairs&quot;:[{&quot;Description&quot;:&quot;elbv2.k8s.aws/targetGroupBinding=shared&quot;,&quot;GroupId&quot;:&quot;sg-080bffd697dc0ab27&quot;,&quot;GroupName&quot;:null,&quot;PeeringStatus&quot;:null,&quot;UserId&quot;:null,&quot;VpcId&quot;:null,&quot;VpcPeeringConnectionId&quot;:null}]}]}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379854.1990266,&quot;msg&quot;:&quot;authorized securityGroup ingress&quot;,&quot;securityGroupID&quot;:&quot;sg-03aa126eb1aaeacc5&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379854.3660266,&quot;msg&quot;:&quot;registering targets&quot;,&quot;arn&quot;:&quot;arn:aws:elasticloadbalancing:us-east-1:111111111111:targetgroup/k8s-app-apihttp-ee37d33f98/8e8cf427880a005f&quot;,&quot;targets&quot;:[{&quot;AvailabilityZone&quot;:null,&quot;Id&quot;:&quot;i-08b9e38bcf885a07a&quot;,&quot;Port&quot;:30867},{&quot;AvailabilityZone&quot;:null,&quot;Id&quot;:&quot;i-0cdcd5bd12476c990&quot;,&quot;Port&quot;:30867}]}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379854.5757735,&quot;msg&quot;:&quot;registered targets&quot;,&quot;arn&quot;:&quot;arn:aws:elasticloadbalancing:us-east-1:111111111111:targetgroup/k8s-app-apihttp-ee37d33f98/8e8cf427880a005f&quot;}
</code></pre>
<p>Here are the logs for the other pod in the AWS Load Balancer Controller deployment:</p>
<pre><code>~/git/github/django-cdk$ kubectl logs -n kube-system goeksstackdjangoekssamplealbingresscontroller48a16415-aws-q9nmg
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379840.7888832,&quot;msg&quot;:&quot;version&quot;,&quot;GitVersion&quot;:&quot;v2.2.0&quot;,&quot;GitCommit&quot;:&quot;68c417a7ea37ff153f053d9ffef1cc5c70d7e211&quot;,&quot;BuildDate&quot;:&quot;2021-05-14T21:49:05+0000&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379840.8260994,&quot;logger&quot;:&quot;controller-runtime.metrics&quot;,&quot;msg&quot;:&quot;metrics server is starting to listen&quot;,&quot;addr&quot;:&quot;:8080&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379840.8316746,&quot;logger&quot;:&quot;setup&quot;,&quot;msg&quot;:&quot;adding health check for controller&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379840.8317719,&quot;logger&quot;:&quot;controller-runtime.webhook&quot;,&quot;msg&quot;:&quot;registering webhook&quot;,&quot;path&quot;:&quot;/mutate-v1-pod&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379840.8318048,&quot;logger&quot;:&quot;controller-runtime.webhook&quot;,&quot;msg&quot;:&quot;registering webhook&quot;,&quot;path&quot;:&quot;/mutate-elbv2-k8s-aws-v1beta1-targetgroupbinding&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379840.83182,&quot;logger&quot;:&quot;controller-runtime.webhook&quot;,&quot;msg&quot;:&quot;registering webhook&quot;,&quot;path&quot;:&quot;/validate-elbv2-k8s-aws-v1beta1-targetgroupbinding&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379840.831849,&quot;logger&quot;:&quot;controller-runtime.webhook&quot;,&quot;msg&quot;:&quot;registering webhook&quot;,&quot;path&quot;:&quot;/validate-networking-v1beta1-ingress&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379840.8319223,&quot;logger&quot;:&quot;setup&quot;,&quot;msg&quot;:&quot;starting podInfo repo&quot;}
I0611 02:50:42.832101       1 leaderelection.go:242] attempting to acquire leader lease  kube-system/aws-load-balancer-controller-leader...
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379842.8324547,&quot;logger&quot;:&quot;controller-runtime.manager&quot;,&quot;msg&quot;:&quot;starting metrics server&quot;,&quot;path&quot;:&quot;/metrics&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379842.9327362,&quot;logger&quot;:&quot;controller-runtime.webhook.webhooks&quot;,&quot;msg&quot;:&quot;starting webhook server&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379842.9332633,&quot;logger&quot;:&quot;controller-runtime.certwatcher&quot;,&quot;msg&quot;:&quot;Updated current TLS certificate&quot;}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379842.9333658,&quot;logger&quot;:&quot;controller-runtime.webhook&quot;,&quot;msg&quot;:&quot;serving webhook server&quot;,&quot;host&quot;:&quot;&quot;,&quot;port&quot;:9443}
{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:1623379842.9334989,&quot;logger&quot;:&quot;controller-runtime.certwatcher&quot;,&quot;msg&quot;:&quot;Starting certificate watcher&quot;}
</code></pre>
<p>I replaced my account ID with <code>111111111111</code>.</p>
<p>Here is the ALB DNS name from my CDK Stack's CfnOutput:</p>
<pre><code>k8s-app-appingre-a5bb1f9208-1217069225.us-east-1.elb.amazonaws.com
</code></pre>
<p>and here is the DNS name for the ALB from the EC2 &gt; Load Balancers console:</p>
<pre><code>k8s-app-appingre-df49e963f5-842078657.us-east-1.elb.amazonaws.com
</code></pre>

briancaffey
<p>I think that the answer is to use <a href="https://github.com/kubernetes-sigs/external-dns" rel="nofollow noreferrer">external-dns</a>.</p>
<blockquote>
<p>ExternalDNS allows you to control DNS records dynamically via Kubernetes resources in a DNS provider-agnostic way.</p>
</blockquote>
