[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-07-31。"],[],[],null,["Google Distributed Cloud software-only supports using OpenStack as a private cloud\nplatform. This guide describes how to configure a cluster to work with an\nexternal cloud provider. Running an installation of Google Distributed Cloud\nsoftware-only clusters on OpenStack lets you use the following OpenStack\nservices:\n\n- Infrastructure as a Service (IaaS)\n\n- Load balancing as a Service (LBaaS)\n\n- Storage\n\nConfiguring a cluster to work with OpenStack consists of the following:\n\n- When you create the cluster, you add a\n `baremetal.cluster.gke.io/external-cloud-provider` annotation\n\n- This annotation causes Google Distributed Cloud to add a kubelet flag\n `cloud-provider=external`\n\n- The kubelet then adds\n `node.cloudprovider.kubernetes.io/uninitialized:NoSchedule` taints to the\n cluster nodes\n\nThis configuration allows you and OpenStack to own the node init processes. For\nexample, you can deploy Google Distributed Cloud software on OpenStack to\nautomatically provision OpenStack Load Balancing as a Service (LBaaS) resources\nor to make use of other OpenStack capabilities. The LBaaS resources can replace\nthe MetalLB resources to expose Services running on your clusters to other\nOpenStack tenants or outside the OpenStack network. For more information about\nOpenStack features and benefits, see the\n[OpenStack documentation](https://docs.openstack.org/2023.2/).\n\nRelated examples\n\nThis document only covers how to configure your cluster for use with OpenStack.\nThe following guides walk you through an example deployment:\n\n- [Deploy a cluster on OpenStack](/kubernetes-engine/distributed-cloud/bare-metal/docs/installing/openstack-abm-install)\n walks you through a sample deployment of a hybrid cluster on OpenStack\n virtual machines (VMs). The deployment uses a script to simplify the\n installation. The guide also shows you one way to enable load balancing as a\n Service (LBaaS).\n\n- [Configure the OpenStack Cloud Provider for Kubernetes](/kubernetes-engine/distributed-cloud/bare-metal/docs/installing/openstack-k8s-provider)\n shows you how to install the OpenStack Cloud Provider on a cluster that's\n been deployed on OpenStack. The OpenStack Cloud Provider isn't required to\n use Google Distributed Cloud software with OpenStack.\n\nBefore you begin\n\n- Decide which clusters need to use OpenStack LBaaS resources.\n\n Once you've created a cluster configured to use OpenStack LBaaS resources,\n you can't change the configuration to switch to MetalLB resources. Make sure\n that you initialize your clusters with the correct cloud provider\n configuration.\n- Ensure you have access to the machines you're trying to configure.\n\nLearn more about [running the cloud-controller-manager](https://kubernetes.io/docs/tasks/administer-cluster/running-cloud-controller/#running-cloud-controller-manager)\nin the Kubernetes documentation.\n\nChange your cluster configuration file\n\nThe OpenStack Kubernetes Cloud Provider requires that `kubelet` runs on all the\nnodes with the following argument:\n**Note:** The OpenStack Cloud Provider is used as an example in [Configure the OpenStack Cloud Provider for Kubernetes](/kubernetes-engine/distributed-cloud/bare-metal/docs/installing/openstack-k8s-provider), but it isn't required to integrate Google Distributed Cloud with OpenStack. \n\n cloud-provider: \"external\"\n\nTo ensure that your cluster meets this requirement, add the\n`baremetal.cluster.gke.io/external-cloud-provider: \"true\"` annotation to your\ncluster configuration file under the metadata section before you create the\ncluster.\n\nThe entry in your configuration file should look like the following example: \n\n apiVersion: baremetal.cluster.gke.io/v1\n kind: Cluster\n metadata:\n name: cluster1\n namespace: cluster-cluster1annotations:\n baremetal.cluster.gke.io/external-cloud-provider: \"true\"\n spec:\n ...\n\nSome cloud providers on other cloud platforms require a special format for\n`providerID`. Google Distributed Cloud generates a `providerID` with a format like\n`baremetal://`\u003cvar translate=\"no\"\u003eMACHINE_ADDRESS\u003c/var\u003e for each node machine. If you\nwant to have a different `providerID`, you can specify one for each node along\nwith the IP address.\n\nThe following sample cluster configuration file shows how you specify\n`providerID` for your cluster nodes: \n\n apiVersion: baremetal.cluster.gke.io/v1\n kind: Cluster\n metadata:\n name: cluster1\n namespace: cluster-cluster1\n spec:\n clusterNetwork:\n pods:\n cidrBlocks:\n - 192.168.0.0/16\n services:\n cidrBlocks:\n - 10.96.0.0/20\n controlPlane:\n nodePoolSpec:\n nodes:\n - address: 10.200.0.1+ providerID: some-prefix://unique-string\n - address: 10.200.0.2+ providerID: some-prefix2://unique-string2\n ...\n\n ---\n apiVersion: baremetal.cluster.gke.io/v1\n kind: NodePool\n metadata:\n name: nodepool1\n namespace: cluster-cluster1\n spec:\n clusterName: cluster1\n nodes:\n - address: 172.18.0.2+ providerID: some-prefix3://unique-string3\n\nCreate your cluster\n\nAfter you edit the configuration file, use the following command to initialize\nyour cluster: \n\n bmctl create cluster -c cluster1\n\nFor more information about creating clusters, see [Cluster creation overview](/kubernetes-engine/distributed-cloud/bare-metal/docs/installing/creating-clusters/create-clusters-overview).\n\nNode configuration\n\nWhen you create a cluster configured for OpenStack, the cluster nodes have the\nfollowing changes:\n\n- All nodes in `cluster1` run with the required argument: `cloud-provider:\n \"external\"`.\n\n- All nodes also have the following taint added to their configuration files:\n\n taints:\n - effect: NoSchedule\n key: node.cloudprovider.kubernetes.io/uninitialized\n value: \"true\"\n\n These taints are removed after you initialize your cloud provider on this\n cluster.\n- `kubelet` runs with the `providerID` you specified in the cluster\n configuration file.\n\nWhat's next\n\n- [Deploy a cluster on OpenStack](/kubernetes-engine/distributed-cloud/bare-metal/docs/installing/openstack-abm-install)"]]