Enable the OpenStack cloud provider

Enable the OpenStack cloud providerΒΆ

Before you deploy a new Kubernetes cluster on VMs on top of OpenStack, enable the OpenStack cloud provider by making corresponding changes in you deployment metadata model.

Caution

Mirantis recommends that you enable the OpenStack cloud provider on new Kubernetes clusters only. Enabling the OpenStack cloud provider on existing Kubernetes clusters may impact your workloads. The Kubernetes nodes will be re-registered with FQDN-based names identical to the corresponding instances names on your OpenStack environment. This may impact your workloads pinned to particular nodes and requires a manual clean up of stalled nodes.

To enable the OpenStack cloud provider:

  1. Verify that you have an existing OpenStack environment to be used to deploy a Kubernetes cluster on top of OpenStack. For the requirements details, see: Considerations when using the OpenStack cloud provider.

  2. Prepare six VMs that will include the Salt Master node and corresponding network configuration to be used for deploying a new Kubernetes cluster. For details, see: Prerequisites.

  3. Open your Git project repository with Reclass model on the cluster level.

  4. In classes/cluster/<cluster_name>/kubernetes/init.yml, add the following parameters, replacing the credentials to reflect your OpenStack environment:

    _param:
    
      kubernetes_cloudprovider_enabled: True
      kubernetes_cloudprovider_type: 'openstack'
    
      kubernetes_openstack_provider_cloud_user: admin
      kubernetes_openstack_provider_cloud_password: secret
      kubernetes_openstack_provider_cloud_auth_url: <public_keystone_endpoint>
      kubernetes_openstack_provider_cloud_tenant_id: <tenant_id>
      kubernetes_openstack_provider_cloud_domain_id: default
      kubernetes_openstack_provider_cloud_region: RegionOne
      kubernetes_openstack_provider_lbaas_subnet_id: <subnet_id>
      kubernetes_openstack_provider_floating_net_id: <floating_net_id>
    

    Note

    The subnet_id parameter is the UUID of the subnet from which you can access internal addresses of the Kubernetes nodes, or external addresses if internal ones are not present on a cluster. Do not use the network ID.

  5. Commit and push the changes to the project Git repository.

  6. Proceed with further cluster configuration as required. OpenStack cloud provider will be automatically deployed with the Kubernetes cluster.

After you deploy the OpenStack cloud provider, proceed to Verify the OpenStack cloud provider after deployment.