Skip to main content

Posts

Showing posts with the label Azure

How to create Service type LoadBalancer with private ip address from assigned vnet-subnet

Use-case - To expose the service within virtual network as Internal LoadBalancer By default, when we create service type LoadBalancer without customized annotations in AKS(Azure Kubernetes Service), then AKS will create Load Balancer with Public IP attached to it, through which application can be accessible to internet world. However, it is possible that we may need to create service to be exposed within virtual network only, however with service type Load Balancer. For this, we need to add service.beta.kubernetes.io/azure-load-balancer-internal: "true" in annotations in kubernetes service manifest file. Create an Internal LoadBalancer apiVersion: v1 kind: Service metadata: name: nameOfService annotations: service.beta.kubernetes.io/azure-load-balancer-internal: "true" spec: type: LoadBalancer ports: - port: 8080 targe...