Create Cluster with OpenStack Cloud Provider
Before you can create a Kubernetes cluster on an OpenStack cloud, you must have created an OpenStack cloud provider first.
Ensure that the following OpenStack resources to be used by the Kubernetes cluster are present on your OpenStack deployment.
- Image to be used for the Kubernetes nodes
- Flavors to be used for master nodes and worker nodes
- Provider networks (KVM only)
- Security groups
Boot From Volume Option
You can, optionally, have the Kubernetes cluster nodes boot from OpenStack Cinder volumes. When you select this option during cluster creation, you will be asked to specify volume size for master and worker nodes. During deployment of each node as part of cluster creation, OpenStack will create a new Cinder volume for each node and copy the contents of the image to that volume, so that it can be used as a boot disk for that node.
If you do not select the ‘Boot from Volume’ option, the cluster nodes will be created by leveraging hypervisor local storage for their disks. Volumes are not deleted when a cluster node is deleted, which helps if you’d like to retain the volume data across node lifecycle. Clusters that boot from Cinder volumes can leverage persistent storage from storage arrays or other storage solutions provided by vendors such as Dell-EMC, NetApp etc. This might be of value in the following scenarios:
- Your Kubernetes applications involve involve high amount of read and write operations and hence require high storage performance
- Your Kubernetes applications require a reliable backup option for persistent storage.
- The hypervisors in your OpenStack environment do not have sufficient local disk capacity, and hence usage of a storage backend is required to provide sufficient storage for virtual machine nodes.
- You would like to retain the data on the volume even when the cluster node is destroyed.
Create Kubernetes Cluster
You must be an administrator to perform this operation.
Follow the steps given below to create a Kubernetes cluster on an OpenStack cloud, when you are logged in to Platform9 Clarity UI.
- Click Kubernetes>Infrastructure>Clusters>Add Cluster.
- Select the appropriate OpenStack Cloud Provider.
- Enter the name for the cluster.
- Select the OpenStack Region this cluster should be deployed in.
- Under Region Type, select KVM.
- Click Next.
- Select the image that the cluster nodes should be created from. Both master and worker nodes are created using the same image
- Select flavor information for master and worker nodes.
- Select Number of Master and Worker Nodes.
Note: Platform9 recommends that you deploy your production setup on a multi-master cluster. You can create multi-master clusters if load balancing as a service (LBaaS) is enabled on your OpenStack environment. If you do not have LBaaS enabled, contact Platform9 support. Platform9 Managed OpenStack currently only supports LBaaS with load balancer provided by Avi networks.
- Select the Disable Workloads on Master Nodes check box, if you wish to disable deployment of containerized workloads on master nodes. This is a recommended step to maintain the stability of the cluster for production deployments.
- Select the Boot from Volume check box, if you wish to boot the nodes in the cluster from a Cinder volume, using the image your specified. This is an optional step.
- Enter the Master Volume Size and the Worker Volume Size in GB, if you have selected the Boot from Volume check box. 50 GB is the default value for both Master Volume Size and Worker Volume Size.
- Click Next.
- Enter the network information, based on the table given below.
Field Description Network Select the network to deploy the cluster on. Subnet Select the subnet to deploy the cluster on. Security Group The security group or groups for the cluster. Enter a comma-separated list of security groups if you are using more than one group. Containers CIDR The IP range that Kubernetes uses to configure the Pods (Docker containers) deployed by Kubernetes Services CIDR The IP range that Kubernetes uses to configure services deployed by Kubernetes HTTP Proxy Select the check box if you want to use an HTTP proxy server for the cluster. If you select this check box, you must specify the IP address and port number of the HTTP proxy server in the text area that appears below the HTTP proxy check box, in the <scheme>://<username>:<password>@<host>:<port> format. The <username>: <password>@ is optional in the HTTP proxy string.
- Click Next.
Enter the advanced configuration details, based on the table given below.
Warning: You must have an in-depth knowledge of the Kubernetes API to be able to correctly use the Advanced API configuration option. If the advanced APIs are inappropriately configured, it could lead to the cluster working incorrectly or the cluster being inaccessible.
Field Description SSH Key Select an SSH key to be associated with the nodes. The SSH key can be used to access the nodes for debugging purpose. Privileged Select the check box to enable the cluster to run privileged containers. Advanced API Configuration Select the check box to configure the APIs to be used by the cluster. If you do not have adequate knowledge of Kubernetes APIs, it is recommended to avoid selecting this check box. When this check box is not selected, the GA and beta APIs (that is the stable APIs) for the currently installed Kubernetes version are enabled. Default API groups and versions This option is visible only if you select the Advanced API Configuration check box. Select the Default API groups and versions option to enable on the cluster, the default APIs based on the Kubernetes installation in your environment. All API groups and versions This option is visible only if you select the Advanced API Configuration check box. Select All API groups and versions option to enable on the cluster, all alpha, beta, and GA versions of Kubernetes APIs that have been published till date. Custom API groups and versions This option is visible only if you select the Advanced API Configuration check box. Select Custom API groups and versions option to specify one or more API versions that you wish to enable and/or disable. Enter the API versions in the text area following the Custom API groups and versions option. For example, to enable Kubernetes v1 APIs, enter the expression,
api/v1=true. Similarly, to disable Kubernetes v2 APIs, enter the expression,
api/v2=false. If you want to enable and/or disable multiple versions, you could enter comma-separated expressions, such as,
- Select the Enable Application Catalog check box, if you want to deploy applications using the Kubernetes package manager, Helm, on the cluster. This is an optional step.
- Click Next.
- Review the cluster configuration, and then click Create Cluster.
The cluster is created on the specified OpenStack cloud.
You can now deploy your applications on the newly created Kubernetes cluster.