{"id":11606,"date":"2025-08-16T19:59:40","date_gmt":"2025-08-16T19:59:40","guid":{"rendered":"https:\/\/putridparrot.com\/blog\/?p=11606"},"modified":"2025-08-16T19:59:40","modified_gmt":"2025-08-16T19:59:40","slug":"configuring-your-dns-through-to-your-azure-kubernetes-cluster","status":"publish","type":"post","link":"https:\/\/putridparrot.com\/blog\/configuring-your-dns-through-to-your-azure-kubernetes-cluster\/","title":{"rendered":"Configuring your DNS through to your Azure Kubernetes Cluster"},"content":{"rendered":"<p><em>Note: I&#8217;m going to have to list the steps I think I took to buy a domain name on the Azure Portal, as I didn&#8217;t note all the steps down at the time &#8211; so please double check things when creating your own.<\/em><\/p>\n<p>You can create you domain wherever you like, I happened to have decided to create mine via Azure.<\/p>\n<ul>\n<li>Go to the Azure portal<\/li>\n<li>Search for DNS Zones and click the Create button<\/li>\n<li>Supply your subscription and resource group<\/li>\n<li>Select your domain name<\/li>\n<li>Click the Review + Create then create to DNS Zone<\/li>\n<\/ul>\n<p>To set up the DNS zone (I cannot recall if this was part of the above or a separate step), run<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\naz network dns zone create \\\r\n--resource-group {RESOURCE_GROUP} \\\r\n--name {DOMAN_NAME}\r\n<\/pre>\n<p>I&#8217;m going to assume you have Kubernetes installed. <\/p>\n<p>We need a way to get from the outside world into our Kubernetes cluster so we&#8217;ll create and ingress controller using<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nhelm install ingress-nginx ingress-nginx\/ingress-nginx \\\r\n--create-namespace --namespace ingress-nginx \\\r\n--set controller.service.annotations.&quot;service\\.beta\\.kubernetes\\.io\/azure-load-balancer-health-probe-request-path&quot;=\/healthz \\\r\n--set controller.service.externalTrafficPolicy=Local\r\n<\/pre>\n<p>Next we need to update our DNS record to use the EXTERNAL_IP of the ingress controller we&#8217;ve just created, so <\/p>\n<ul>\n<li>Run the following to get the EXTERNAL_IP\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nkubectl get svc ingress-nginx-controller -n ingress-n\r\n<\/pre>\n<\/li>\n<li>You can go into the DNS record and change the A record (@ Type and any other subdomains you&#8217;ve added) to use the EXTERNAL_IP address or use\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\naz network dns record-set a add-record --resource-group {RESOURCE_GROUP} \\ \r\n--zone-name {DOMAIN_NAME} --record-set-name --ipv4-address {EXTERNAL_IP}\r\n<\/pre>\n<\/li>\n<\/ul>\n<p>At this point you&#8217;ll obviously need to set up your service with it&#8217;s own ingress using your domain in the &#8220;host&#8221; value of the ingress.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Note: I&#8217;m going to have to list the steps I think I took to buy a domain name on the Azure Portal, as I didn&#8217;t note all the steps down at the time &#8211; so please double check things when creating your own. You can create you domain wherever you like, I happened to have [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[96,314],"tags":[],"class_list":["post-11606","post","type-post","status-publish","format-standard","hentry","category-azure-2","category-kubernetes"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/11606","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/comments?post=11606"}],"version-history":[{"count":5,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/11606\/revisions"}],"predecessor-version":[{"id":11612,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/posts\/11606\/revisions\/11612"}],"wp:attachment":[{"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/media?parent=11606"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/categories?post=11606"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/putridparrot.com\/blog\/wp-json\/wp\/v2\/tags?post=11606"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}