Skip to content

docs: add new feature explaination on guest cluster for load balancer - #1082

Open
Yu-Jack wants to merge 3 commits into
harvester:mainfrom
Yu-Jack:HARV-5486
Open

docs: add new feature explaination on guest cluster for load balancer#1082
Yu-Jack wants to merge 3 commits into
harvester:mainfrom
Yu-Jack:HARV-5486

Conversation

@Yu-Jack

@Yu-Jack Yu-Jack commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Problem:

Solution:

Related Issue(s):

harvester/harvester#5486

Test plan:

Additional documentation or context

@Yu-Jack Yu-Jack self-assigned this Jul 14, 2026
@Yu-Jack Yu-Jack changed the title test docs: add new feature explaination on guest cluster for load balancer Jul 14, 2026
@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Name Link
🔨 Latest commit 0283b03
😎 Deploy Preview https://6a7aca5e8fcf41b7833a6b11--harvester-preview.netlify.app

@Yu-Jack
Yu-Jack requested review from a team and w13915984028 July 17, 2026 02:44
@Yu-Jack
Yu-Jack marked this pull request as ready for review July 17, 2026 02:44
@Yu-Jack
Yu-Jack requested review from a team and jillian-maroket as code owners July 17, 2026 02:44

@jillian-maroket jillian-maroket left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review done

Comment thread docs/rancher/cloud-provider.md Outdated
Comment thread docs/rancher/cloud-provider.md Outdated
Comment thread docs/rancher/cloud-provider.md Outdated
Comment thread docs/rancher/cloud-provider.md Outdated
Comment thread docs/rancher/cloud-provider.md Outdated

@w13915984028 w13915984028 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, please check and update.

Comment thread docs/rancher/cloud-provider.md Outdated
- **DHCP:** A DHCP server is required. The Harvester load balancer will request an IP address from the DHCP server.

- **Pool:** An [IP pool](../networking/ippool.md) must be configured first. The Harvester load balancer controller will allocate an IP for the load balancer service following [the IP pool selection policy](../networking/ippool.md#selection-policy). Notice the difference between [Create IP Pool from Harvester UI directly](../networking/ippool.md#how-to-create) and [Create IP Pool from Rancher Managery UI](../networking/ippool.md#create-ip-pool-from-rancher-manager-ui). Refer to the [Best Practice](../networking/ippool.md#best-practice).
Starting with **Rancher v2.15.1**, you can select a **VM network** from the UI when creating a `LoadBalancer` service. This tells the load balancer which network interface to use, so the VIP is bound to the correct interface instead of always defaulting to the management interface. If no VM network is selected, the behavior is the same as before.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to mention currently the UI selection defaults to kube-vip for the selected network, if user disables kube-vip but uses another loadbalancer provider, then user needs to check for related solution.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll put this on limitation section.

Comment thread docs/rancher/cloud-provider.md Outdated
On older Rancher versions (v2.12.x, v2.13.x, and v2.14.x), the UI does not have this option, but you can still achieve the same result by setting the following annotations on the service:

- `cloudprovider.harvesterhci.io/ipam: "dhcp"`
- `cloudprovider.harvesterhci.io/network: "default/mgmt-vlan1"`

@w13915984028 w13915984028 Aug 10, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also mention the limitation, if user sets the annotation cloudprovider.harvesterhci.io/network directly, but the network is wrong/incorrect, or the network topology is Asymmetric Network Topology, then the LB might not get IP or LB IP is un-reachable. There is no webhook to check for this. Suggest user to select the target network from UI.

Comment thread docs/rancher/cloud-provider.md Outdated

- **Pool:** An [IP pool](../networking/ippool.md) must be configured first. The Harvester load balancer controller will allocate an IP for the load balancer service following [the IP pool selection policy](../networking/ippool.md#selection-policy). Notice the difference between [Create IP Pool from Harvester UI directly](../networking/ippool.md#how-to-create) and [Create IP Pool from Rancher Manager UI](../networking/ippool.md#create-ip-pool-from-rancher-manager-ui). Refer to the [Best Practice](../networking/ippool.md#best-practice).

Starting with **Rancher v2.15.1**, you can select a **VM network** from the UI when creating a `LoadBalancer` service to explicitly bind the load balancer to a specific network interface. If no VM network is selected, the load balancer controller automatically determines the network.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If no VM network (specifically, the cloudprovider.harvesterhci.io/network is empty) is selected

Comment thread docs/rancher/cloud-provider.md Outdated
- **DHCP:** A DHCP server is required. The Harvester load balancer will request an IP address from the DHCP server.

- **Pool:** An [IP pool](../networking/ippool.md) must be configured first. The Harvester load balancer controller will allocate an IP for the load balancer service following [the IP pool selection policy](../networking/ippool.md#selection-policy). Notice the difference between [Create IP Pool from Harvester UI directly](../networking/ippool.md#how-to-create) and [Create IP Pool from Rancher Managery UI](../networking/ippool.md#create-ip-pool-from-rancher-manager-ui). Refer to the [Best Practice](../networking/ippool.md#best-practice).
Starting with **Rancher v2.15.1**, you can select a **VM network** from the UI when creating a `LoadBalancer` service. This tells the load balancer which network interface to use, so the VIP is bound to the correct interface instead of always defaulting to the management interface. If no VM network is selected, the behavior is the same as before.

@w13915984028 w13915984028 Aug 10, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another two limitations:
(1) The pre-condition of LB on secondary-network is: each guest-cluster node (Harvester VM) has successfully set the second-network NIC, which has IP and route. If not, the LB might not work. and this is also the first step to troubeshooting.

(2) If user wants to change the LB network, user needs to delete and recreate it. Direct change the network annotation might have potential issues. (I did not test this yet, but suspect it has issues)

Yu-Jack and others added 3 commits August 11, 2026 14:25
Co-authored-by: Jillian Maroket <67180770+jillian-maroket@users.noreply.github.com>
Signed-off-by: Jack Yu <jack.yu@suse.com>
Signed-off-by: Jack Yu <jack.yu@suse.com>

@w13915984028 w13915984028 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.


:::tip

If a VM network is attached in a different NIC order across nodes, shut down the affected virtual machines, reorder the network interfaces so the attachment order is consistent across all nodes, and restart the virtual machines.

@w13915984028 w13915984028 Aug 11, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On guest cluster case, it is to re-configure the related machine-pool and let Rancher Manager & RKE2 re-provision the guest cluster VMs.

https://docs.harvesterhci.io/v1.8/rancher/node/rke2-cluster#create-rke2-kubernetes-cluster

On earlier Rancher versions (v2.12.x, v2.13.x, and v2.14.x), you can achieve the same result by adding the following annotations to the `Service` manifest:

- `cloudprovider.harvesterhci.io/ipam: "dhcp"`
- `cloudprovider.harvesterhci.io/network: "default/mgmt-vlan1"`

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need the user configure the viphost related annotation manually as well?

@mergify

mergify Bot commented Aug 11, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants