You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
902 B

  1. # GCP Load Balancers for type=LoadBalacer of Kubernetes Services
  2. Google Cloud Platform can be used for creation of Kubernetes Service Load Balancer.
  3. This feature is able to deliver by adding parameters to `kube-controller-manager` and `kubelet`. You need specify:
  4. ```ShellSession
  5. --cloud-provider=gce
  6. --cloud-config=/etc/kubernetes/cloud-config
  7. ```
  8. To get working it in kubespray, you need to add tag to GCE instances and specify it in kubespray group vars and also set `cloud_provider` to `gce`. So for example, in file `group_vars/all/gcp.yml`:
  9. ```yaml
  10. cloud_provider: gce
  11. gce_node_tags: k8s-lb
  12. ```
  13. When you will setup it and create SVC in Kubernetes with `type=LoadBalancer`, cloud provider will create public IP and will set firewall.
  14. Note: Cloud provider run under VM service account, so this account needs to have correct permissions to be able to create all GCP resources.