Create a cluster

Create a Cluster

Context

Creating a cluster is essential for any further tutorial.
Every tutorial will require a working MetaKube cluster.
Each cluster is tied to a project.

Prerequisites

In order to create a cluster, you need to have the "Owner" or "Editor" role in a MetaKube Project.

Steps

To create a new cluster, select a MetaKube Project from the login page and click the button entry Add Cluster.
Clusters are tied to a Project.

You can create as many clusters within one project as you want.

Provider and Data Center

Choose the provider and the region in which you want to create your cluster.

Start by choosing a cloud provider and region, then click Next:

Overview of cluster creation

Cluster

In the next step of the installer, enter your cluster details into the Cluster tab.

The mandatory fields are:

  • Cluster: the name of your cluster.
  • Version: the Kubernetes version which will be used for the cluster. This version can be upgraded in an existing cluster, whenever an upgrade is available.
  • Container Runtime: either "containerd" (default) or "docker" (deprecated, not supported for Kubernetes >= 1.22)

By default, Metakube will automatically set up the following Openstack resources for a new cluster:

  • Network metakube-<cluster id> with IPv4 subnet metakube-<cluster-id> with subnet CIDR 192.168.1.0/24
  • Security group metakube-<cluster-id> for the worker nodes with all necessary rules
  • Server group metakube-<cluster-id> with soft-anti-affinity to spread nodes across different hardware nodes

Please do not change any Advanced Configuration settings if you do not have any special requirements.
For more information see Advanced Configuration

Overview of cluster settings

Settings

In the next step of the installer, enter your cluster details into the Cluster tab.
The only mandatory fields are for the credentials and the project.

Please note that the credentials in the screenshots have been redacted.
Overview of cluster settings

Then add your cloud credentials the Settings tab.
You have the option to use Openstack Application Credentials or Username, Password and Tenant combination.
We suggest to use application credentials because they are not user bound, and they allow you to have single purpose access data that you will not need to change if you, for example, change your password.

Initial Nodes

For node settings we recommend at least 3 nodes sized m1.small or bigger. For an overview of the possible node flavors see the SysEleven Stack documentation. It is also possible to choose the operating system and image used for your worker nodes:

Overview of cluster settings with highlighted node section

We provide Ubuntu and Flatcar for your cluster nodes OS, with Ubuntu as default. You can also choose a different image available at your Openstack tenant. To get a list of base images, navigate to Project -> Compute -> Images in the SysEleven Stack dashboard:

Overview of openstack images

Make sure to enter the exact name of the image you want to run on your machines, as listed in the images tab of the SysEleven stack dashboard. See also supported operating systems.
The chosen SSH key added in the Cluster tab will be used for authentication for the default user (e.g. ubuntu for Ubuntu images) on all worker nodes.

Summary

The summare screen gives you an overview of the data you provided in the previous tabs and some of the default values which will be used for the cluster generation.

Just click Create Cluster for the actual generation.
The process might take a few minutes during which the the status of all components will gradually change to green
Please note that "CoreDNS" might get a red status for a while, but will switch to green, once the first nodes have joined the cluster.

Validation

After all of the master components are ready, your cluster will create the configured number of worker nodes in your SysEleven Stack tenant. Fully created nodes will be marked with a green dot, pending ones with a yellow circle. You can then download the kubeconfig by clicking the button Download Config to be able to use kubectl with your cluster. After all nodes are created you can use kubectl to view and check the status of the created nodes:

$ kubectl get nodes
NAME                        STATUS   ROLES    AGE   VERSION
tutorial-5bd864df7c-hvbkl   Ready    <none>   63m   v1.23.8
tutorial-5bd864df7c-hztvf   Ready    <none>   63m   v1.23.8
tutorial-5bd864df7c-x586s   Ready    <none>   63m   v1.23.8

Clean-up

There is no clean-up for this tutorial, because you will need this for all further tutorials.