Can I have an update
How to publish services on AKS with Nodeport service type
I want to access my services via Nodeport service type. Could you kindly confirm if it is feasible? From https://github.com/Azure/AKS/issues/518 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.
Sign in to comment
Sort by: Most helpful
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: https://learn.microsoft.com/en-us/azure/aks/use-multiple-node-pools#assign-a-public-ip-per-node-for-your-node-pools-preview
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.
Thank you. Please provide an update if you receive any.