Search code examples
kuberneteskubernetes-ingressweb-hostingazure-aks

Configure Azure Ingress Public IP with DNS



Pardon me I'm new to AKS and Kubernetes. I have setup a Domain and I have an ingress running with the host name as domain in AKS. How should I link the Domain with Ingress ? Like would AKS provide me an IP that I should enter in the Manage DNS part of the place where I have bought the domain.

Thanks


Solution

  • If my understanding is correct, your ingress controller with external IP is already created and you need only to route domain from domain registrar to this ingress controller. Well process is pretty straight forward. You need to get the public ip (external-ip) of ingress controller attached load balancer.

    kubectl get svc -n ingress-controller
    NAME                                               TYPE           CLUSTER-IP     EXTERNAL-IP      PORT(S)                      AGE
    nginx-ingress-ingress-nginx-controller             LoadBalancer   10.100.13.88   35.194.x.x   80:30011/TCP,443:30417/TCP   48d
    nginx-ingress-ingress-nginx-controller-admission   ClusterIP      10.100.0.207   <none>           443/TCP                      48d
    

    In my case namespace for controller is ingress-controller. Replace this field with your value.

    Add this external IP in your domain registart against the domain you want to map.

    yourdomain.com 34.194.x.x 
    

    and it should be fine.

    If you want a sample ingress manifest file with ssl and domain attached, please refer this answer