Harvester Cloud Provider¶
Available as of v0.3.0
The Harvester cloud provider used by the guest cluster in Harvester provides a CSI driver and cloud controller manager(CCM) which implements a built-in load balancer. In this section, you will learn about
how to deploy the harvester cloud provider in RKE and RKE2
how to configure the load balancer with the annotation of services
- The Kubernetes cluster is built on top of Harvester virtual machines.
- The Harvester virtual machines running as guest Kubernetes nodes are in the same namespace.
Deploying int the RKE1 with Harvester node driver¶
When spinning up an RKE cluster using the Harvester node driver, you can perform two steps to deploy the Harvester cloud provider.
- Select the
- Generate add-on configuration and add it to the rke YAML file.
# depend on kubectl to operate the Harvester curl -sfL https://raw.githubusercontent.com/harvester/cloud-provider-harvester/master/deploy/generate_addon.sh | sh -s <serviceAccount name> <namespace>
Deploying in the RKE2 with Harvester node driver¶
When spinning up an RKE2 cluster using the Harvester node driver, select the
Harvester cloud provider, then the node driver will help deploy both the CSI driver and CCM automatically.
Load Balancer Request Parameters¶
When setting up a Kubernetes service of load balancer type, you can configure the load balancer with the service annotations.
The Harvester built-in load balancer supports both
dhcp mode to specify the load balancer IP by the annotation key
cloudprovider.harvesterhci.io/ipam. The value defaults to
pool: You should configure an IP address pool in the Harvester in advance. The Harvester LoadBalancer controller will allocate an IP address from the IP address poll for the load balancer. Refer to the guideline about how to configure an IP address pool.
dhcp: It requires a DHCP server. The Harvester LoadBalancer controller will request an IP address from the DHCP server.
The Harvester load balancer supports TCP health checks. The details of the related annotations are as following.
cloudprovider.harvesterhci.io/healthcheck-portspecifies the port. The prober will access the address composed of the backend server IP and the port. This option is required.
cloudprovider.harvesterhci.io/healthcheck-success-thresholdspecifies the health check success threshold. The default value is 1. If the number of times that the prober continuously successfully detects an address reaches the success threshold, the backend server can start to forward traffic.
cloudprovider.harvesterhci.io/healthcheck-failure-thresholdspecify the success and failure threshold. The default value is 3. The backend server will stop forward traffic if the number of health check failures reaches the failure threshold.
cloudprovider.harvesterhci.io/healthcheck-periodsecondsspecifies the health check period. The default value is 5 seconds.
cloudprovider.harvesterhci.io/healthcheck-timeoutsecondsspecifies the timeout of every health check. The default value is 3 seconds.