Home > Mobile >  Can i replace loadbalancer in aks cluster
Can i replace loadbalancer in aks cluster

Time:05-18

I am using multiple pods and their services, some of the services are of the type load balancer, which will expose the public IP.

But many of the services are called internally and no need to use public IP instead I can use private IP, what change do I need to make to the load balancer to use private IP.

I assume, the load balancer cost more compared to other types of services in the aks cluster.

Please let me know how to reduce the cost

CodePudding user response:

Just do not annotate the services with type: LoadBalancer but instead use type: ClusterIP

CodePudding user response:

Configure an application gateway with an internal load balancer (ILB) endpoint Expand the portal menu and select Create a resource.

Select Networking and then select Application Gateway in the Featured list.

Enter myAppGateway for the name of the application gateway and myResourceGroupAG for the new resource group.

For Region, select Central US.

For Tier, select Standard.

Under Configure virtual network select Create new, and then enter these values for the virtual network:

myVNet - for the name of the virtual network. 10.0.0.0/16 - for the virtual network address space. myAGSubnet - for the subnet name. 10.0.0.0/24 - for the subnet address space. myBackendSubnet - for the backend subnet name. 10.0.1.0/24 - for the backend subnet address space. Select OK to create the virtual network and subnets.

Select Next : Frontends.

For Frontend IP address type, select Private.

By default, it's a dynamic IP address assignment. The first available address of the configured subnet is assigned as the frontend IP address.

Select Next:Backends.

Select Add a backend pool.

For Name, type appGatewayBackendPool.

For Add backend pool without targets, select Yes. You'll add the targets later.

Select Add.

Select Next:Configuration.

Under Routing rules, select Add a routing rule.

For Rule name, type Rrule-01.

For Listener name, type Listener-01.

For Frontend IP, select Private.

Accept the remaining defaults and select the Backend targets tab.

For Target type, select Backend pool, and then select appGatewayBackendPool.

For HTTP setting, select Add new.

For HTTP setting name, type http-setting-01.

For Backend protocol, select HTTP.

For Backend port, type 80.

Accept the remaining defaults, and select Add.

On the Add a routing rule page, select Add.

Select Next: Tags.

Select Next: Review create.

Review the settings on the summary page, and then select Create to create the network resources and the application gateway. It may take several minutes to create the application gateway. Wait until the deployment finishes successfully before moving on to the next section.

  • Related