<p>I have successfully deployed an example application on my Azure Kubernetes Service (AKS) cluster using the following command:</p>
<pre><code>kubectl apply -f https://raw.githubusercontent.com/Azure/application-gateway-kubernetes-ingress/master/docs/examples/aspnetapp.yaml
</code></pre>
<p>My AKS cluster is configured with Azure Application Gateway, and I have an Ingress resource that utilizes the Application Gateway with a Public IP address. I can access the web application using the IP address (<a href="http://20.93.56.72/" rel="nofollow noreferrer">http://20.93.56.72/</a>), which works as expected. However, I encountered an issue when attempting to link the Public IP address to a custom DNS zone.</p>
<p>I have set up a subdomain and created an A record pointing to the working Public IP address. Nevertheless, I am unable to access the application using the subdomain. I have also tried creating an A record with an Alias record set pointing to the Public IP Azure Resource.</p>
<p>You can verify that the subdomains are pointing to the correct Public IP address (<a href="http://20.93.56.72/" rel="nofollow noreferrer">http://20.93.56.72/</a>) using the following links:</p>
<p><a href="https://www.whatsmydns.net/#A/mtest.6pack.dev" rel="nofollow noreferrer">https://www.whatsmydns.net/#A/mtest.6pack.dev</a>
<a href="https://www.whatsmydns.net/#A/test2.6pack.dev" rel="nofollow noreferrer">https://www.whatsmydns.net/#A/test2.6pack.dev</a></p>
<p>Despite this, when I try to access the application using either mtest.6pack.dev or test2.6pack.dev, the application fails to load.</p>
<p>I am unsure of the cause of this issue. Do I need to make adjustments to the deployment configuration? Or should I add the A record to my DNS differently?</p>
<p>Any insights or suggestions would be greatly appreciated.</p>
<p>Thank you!</p>

Michael
<p>So the reason is your domain <code>6pack.dev</code> is part of the <a href="https://hstspreload.org/?domain=6pack.dev" rel="nofollow noreferrer">HSTS preload</a> for browsers. The requests to insecure URL <a href="http://mtest.6pack.dev" rel="nofollow noreferrer">http://mtest.6pack.dev</a> is going to be internally redirected to an https:// secure endpoint by the browser.</p>
<p>You don't seem to have the secure endpoint configured.</p>
