Create Cluster with VMware Cloud Provider

Prerequisites

Before you can create a Kubernetes cluster on your VMware environment, you must have created a VMware cloud provider first.

Platform9 supports creation of Kubernetes clusters on VMware using an OpenStack deployment on VMware today. Contact Platform9 suppport if you’d like to enable Platform9 Managed OpenStack on your VMware environment to help achieve this

Ensure that the following OpenStack resources to be used by the Kubernetes cluster are present on your OpenStack deployment on VMware.

  • 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 a 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 then copy the contents of the image to that volume so that it can be used as a boot disk for that node. In a VMware environment, the cinder volume will be created as a separate disk on the underlying default VMFS datastore. This can be configured to be based on your VMware storage policies. For more information re this, refer to SPBM Support For Cinder In VMware

Booting from volume might be beneficial in a VMware environment if you wish to retain the disk content across node deletions. Volumes are not deleted when a cluster node is deleted, which helps if you’d like to retain the volume data across node lifecycle.

Create Kubernetes Cluster

You must be a Platform9 administrator to perform this operation.

Follow the steps given below to create a Kubernetes cluster on your VMware environment.

  1. Click Kubernetes>Infrastructure>Clusters>Add Cluster. create cluster
  2. Select the appropriate OpenStack Cloud Provider.
  3. Enter the name for the cluster.
  4. Select the OpenStack Region this cluster should be deployed in.
  5. Under Region Type, select VMware.
  6. Click Next. cluster configuration
  7. Select the image that the cluster nodes should be created from. This will be a vSphere template in your VMware environment. Both master and worker nodes are created using the same image
  8. Select flavor information for master and worker nodes.
  9. Select Number of Master and Worker Nodes.
  10. 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.
  11. 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.
  12. 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.
  13. Click Next. network info for cluster
  14. 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.
  15. Click Next. advanced config for cluster
  16. Enter the advanced configuration details, based on the table given below.
    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, api/v2=false,api/v1=true.
  17. 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.
  18. Click Next.
  19. Review the cluster configuration, and then click Create Cluster.

The cluster is created on the specified VMware environment.

You can now deploy your applications on the newly created Kubernetes cluster.