How to publish services on AKS with Nodeport service type

Suneetha Busi 1 Reputation point

I want to access my services via Nodeport service type. Could you kindly confirm if it is feasible? From I do see exposing service via Nodeport is not feasible yet, So I consider maybe it is not up to date. Please confirm if that is possible.

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
1,895 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. KarishmaTiwari-MSFT 18,637 Reputation points Microsoft Employee

    NodePort services are a standard Kubernetes feature and well-supported on AKS.

    The linked issue requests NodePort services with Public IPs. By default nodes in AKS have only private IPs so NodePort services will not be reachable from outside the cluster.

    AKS supports public IP per VM now:

    This appears to work with NodePort services on some basic testing, which seems consistent to me (guess the node listens on all addresses). You would need to adjust the NSG to allow all the NodePorts you want to use, though.

    The linked github issue also mentions about trying HA proxy load balancing connections, which is exactly what an ingress controller would do.

    Another point to add is that a service of type 'LoadBalancer' already uses NodePorts to function. You can see the NodePort if you list services or run 'kubectl get svc <svcname>|grep NodePort'.
    The NodePort is what the Azure Load Balancer uses as it is distributing traffic across the nodes.

    Please provide details on why you are interested in using NodePort vs load balancer (less complexity), so that we can help further.

    1 person found this answer helpful.
    0 comments No comments

  2. Suneetha Busi 1 Reputation point

    Can I have an update