Connect a public floating IP address to a load balancer
To give a load balancer in a private subnet inbound and outbound internet access, you can attach a public floating IP address to it. You can also recreate the load balancer in a public subnet.
If you use a load balancer with a Managed Kubernetes cluster, the load balancer is created in the same network as the cluster nodes by default, and a public floating IP address is allocated for it. To create a load balancer without a public IP address or with an IP address from other subnets, use the Configure load balancer in Managed Kubernetes cluster for Ingress or Create and configure load balancer in Managed Kubernetes cluster for Envoy Gateway guide. For the load balancer to work correctly in the cluster, perform all load balancer actions via kubectl.
Connect a public floating IP address to a load balancer
You can attach a public floating IP address when creating a load balancer or to an existing load balancer.
Control panel
OpenStack CLI
- Make sure that the load balancer is in a subnet that meets the requirements; for details, see the Prepare private subnet for attaching public floating IP address section of the Public floating IP addresses guide. You can view the load balancer subnets in the Control panel: in the top menu, click Products → Cloud Servers → Load Balancers → Load Balancers tab → load balancer page → Settings block → Network field.
- In the Control panel, in the top menu, click Products and select Cloud Servers.
- Go to the Load Balancers section → Load Balancers tab.
- On the load balancer card, click Attach public IP.
- Select a public floating IP address.
- Click Attach.
Disconnect a public floating IP address from a load balancer
Control panel
OpenStack CLI
- In the Control panel, in the top menu, click Products and select Cloud Servers.
- Go to the Load Balancers section → Load Balancers tab.
- On the load balancer card, next to the public IP address, click .
- Select Detach public IP address.
- Click Save.