Google Distributed Cloud supports the OpenStack Kubernetes Cloud provider. Use this feature to automatically provision OpenStack Load Balancing as a Service (LBaaS) resources. Those resources can replace the MetalLB resources to easily expose services running on your Anthos on bare metal clusters to other OpenStack tenants or outside the OpenStack network.
Before you begin
Decide the Anthos clusters that need to use OpenStack LBaaS resources.
Ensure you have access to the machines you are trying to configure.
Learn more about running the cloud-controller-manager in the Kubernetes documentation.
Change your clusters' configuration file
The OpenStack Kubernetes Cloud Provider requires that kubelet
runs on all the
nodes with the following argument:
cloud-provider: "external"
To ensure your Anthos clusters easily meet this requirement, add the
baremetal.cluster.gke.io/external-cloud-provider: "true"
annotation to your
clusters' configuration file under the metadata section before initializing
them.
The entry in your configuration file should look like the following example:
apiVersion: baremetal.cluster.gke.io/v1
kind: Cluster
metadata:
name: cluster1
namespace: cluster-cluster1
annotations:
baremetal.cluster.gke.io/external-cloud-provider: "true"
spec:
..
After you edit the configuration file, use the following command to initialize your cluster:
bmctl create cluster -c cluster1
Now, all nodes in cluster1
run with the required argument: cloud-provider:
"external"
All nodes also have the following fields added to their configuration files:
taints:
- effect: NoSchedule
key: node.cloudprovider.kubernetes.io/uninitialized
value: "true"
These fields are removed after you initialize your cloud provider on this cluster.