A follow-up to blog post Deploying Rancher On OpenStack
Tested on Rancher 2.2.4
Rancher Cloud Providers
Rancher cloud providers are similar to Kubernetes cloud providers .
Kubernetes cloud provider is a resource that allows to leverage your cloud infrastructure in order to supply additional infrastructure resources (storage/network) to your Kubernetes cluster.
While Kubernetes supports various cloud providers, Rancher Kubernetes Engine supports the following :
- Custom cloud provider
Adding OpenStack Cloud Provider
As of now, Rancher does not have an option in GUI to configure an OpenStack cloud provider.
Details must be manually added into YAML configuration.
Cloud providers can be added during and after cluster deployment.
An OpenStack cloud provider will allow Kubernetes to access Cinder(block storage) for persistent volumes, Octavia for layer 7 load balancing and Neutron for load balancing.
In cluster configuration, there is an option to view and edit the YAML cluster definition:
YAML section will be shown:
OpenStack Cloud Provider YAML
A cloud provider is defined by YAML:
# Sample OpenStack cloud provider config cloud_provider: name: "openstack" openstackCloudProvider: block_storage: ignore-volume-az: true trust-device-path: false global: auth-url: "XXXXX" # Keystone Auth URL domain-id: "XXXXX" # Identity v3 domain ID tenant-id: "XXXX" # Project ID username: "XXXX" # OpenStack Username password: "XXXX" # OpenStack Password metadata: request-timeout: 0
In order to add an OpenStack cloud provider to Rancher Kubernetes cluster, add the following section to the cluster definition (refer to documentation  for full list of options):
After configuring YAML, your cluster will be deployed/updated:
Wait until cluster is deployed/updated:
Verifying OpenStack Cloud Provider
At this point, we only configured Kubernetes to access OpenStack.
Additional configuration must be done in order to utilize OpenStack resources which is out of scope of this blog post.
Once an OpenStack cloud provider is set, nodes will receive an additional label
Cloud providers are stored in
/etc/kubernetes/cloud-config file on Kubernetes nodes and will contain configuration needed by Kubernetes to communicate with OpenStack:
[Global] auth-url = XXXX username = XXXX password = XXXX tenant-id = XXXX domain-id = XXXX [LoadBalancer] [BlockStorage] ignore-volume-az = true [Route] [Metadata]
Cloud providers grant additional resources to Kubernetes clusters.
OpenStack is a supported cloud provider that extends storage and network capabilities of Kubernetes cluster.
Additional cloud providers may be added during/post Rancher Kubernetes cluster deployment by YAML cluster definition.