Forum Discussion
Kaivalya
Mar 10, 2021Copper Contributor
Azure: How to create Standard Load Balancer without public IP address?
I want to run my application with AKS cluster(version - 1.18.14) with the dependency of standard load balancer to create multiple node pools. But, the standard load balancer is creating public IP add...
ibnmbodji
Apr 24, 2021Iron Contributor
Hi
You can deploy an internal load balancer that can allow you to get an private IP . The manifest will look like this :
apiVersion: v1
kind: Service
metadata:
name: internal-app
annotations:
service.beta.kubernetes.io/azure-load-balancer-internal: "true"
spec:
type: LoadBalancer
ports:
- port: 80
selector:
app: internal-app
and you deploy it with :
kubectl apply -f YourManifestName.yaml
If you didn’t specify the option enable private cluster the API and your load balancer remain public . To create private cluster see the link below :
https://docs.microsoft.com/en-us/azure/aks/private-clusters . Check also this very good article on how to setup a fully private aks cluster ( no public ip)
https://denniszielke.medium.com/fully-private-aks-clusters-without-any-public-ips-finally-7f5688411184
You can deploy an internal load balancer that can allow you to get an private IP . The manifest will look like this :
apiVersion: v1
kind: Service
metadata:
name: internal-app
annotations:
service.beta.kubernetes.io/azure-load-balancer-internal: "true"
spec:
type: LoadBalancer
ports:
- port: 80
selector:
app: internal-app
and you deploy it with :
kubectl apply -f YourManifestName.yaml
If you didn’t specify the option enable private cluster the API and your load balancer remain public . To create private cluster see the link below :
https://docs.microsoft.com/en-us/azure/aks/private-clusters . Check also this very good article on how to setup a fully private aks cluster ( no public ip)
https://denniszielke.medium.com/fully-private-aks-clusters-without-any-public-ips-finally-7f5688411184