Build Kubernetes Cluster with Mirantis


In this post we will build Kubernetes with Mirantis, which is formerly Docker Enterprise). It is the foundation of Kubernetes provided by Mirantis.


In this case environment will be very simple we will build Manager/Worker with a simple configuration one by one. The configuration will also include mgmt. host which will act as a management terminal. More about system requirements can be found in the link below.

Components that have been used


Let’s Start

Since the launchpad requires an environment that allows ssh connection to each server from the mgmt. , first create and deploy the ssh key, and then install all required packages and construction tools on the mgmt. terminal.


Create and deploy the ssh key

#Generate SSH Key in mgmt host
vagrant@mgmt:~$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/vagrant/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/vagrant/.ssh/id_rsa.
Your public key has been saved in /home/vagrant/.ssh/
The key fingerprint is:
SHA256:LmswUxY65mcMd6/C1lnxJDi3mBX+7ttCV2KiuLOa7uU vagrant@mgmt
The key's randomart image is:
+---[RSA 2048]----+
| |
| . . |
| . . o . |
| = + + * o o .|
| o B .SO O o o |
| = +.+ = + . |
| B..o= o . |
| =** o. |
| =*oEo .oo. |
vagrant@mgmt:~$ cat .ssh/
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDYw45xAKioMyJdVCel8Mjsc8xcYbvgqzVf6X8zNQBZbWIwINa+dsTFThkHA+WmQ9eW8/Zsb5kGhqNy7VnrqEBw84JI/F1hMzM1UYw8sspwCZpmlaHjs5JwX6Xsirkj7R8StxczPMci6S7DVyfZ4xRt8xd7SzNofD1BFQbY9Th5fnNKbByNaa4tILPbiP/VZPfdx/MYAMWkTRKHadUVrgJ291660T/MvCMgZTbN6RWY+plIyFUsbaiBt5JSQdcaQo0GoUYVW8XD5yetY+g50eKl2EXE35B59Zn7bhzYLamS1SKCvdTm2KMMn5r3khWJs2LcQNYkcD3Bb9xIUBt0d4YX vagrant@mgmt

Now we can save this key in host kube1 and kube2

#Host kube1. Edit file and paste key from mgmt host
vagrant@kube1:~$ nano .ssh/authorized_keys
#Host kube2. Edit file and paste key from mgmt host
vagrant@kube2:~$ nano .ssh/authorized_keys

Install necessary packages on mgmt. host.

vagrant@mgmt:~$ sudo apt-get update && sudo apt-get install -y apt-transport-https gnupg2

Pre-installation preparation for kubectl

vagrant@mgmt:~$ sudo curl -s | sudo apt-key add - ^C
vagrant@mgmt:~$ sudo echo "deb kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
vagrant@mgmt:~$ sudo apt-get update
Hit:1 bionic InRelease
Hit:2 bionic-security InRelease
Hit:3 bionic-updates InRelease
Hit:5 bionic-backports InRelease
Get:4 kubernetes-xenial InRelease [9,383 B]
Get:6 kubernetes-xenial/main amd64 Packages [47.0 kB]
Fetched 56.4 kB in 1s (37.9 kB/s)
Reading package lists... Done
vagrant@mgmt:~$ sudo apt-get install -y kubectl
vagrant@mgmt:~$ kubectl version
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.1", GitCommit:"5e58841cce77d4bc13713ad2b91fa0d961e69192", GitTreeState:"clean", BuildDate:"2021-05-12T14:18:45Z", GoVersion:"go1.16.4", Compiler:"gc", Platform:"linux/amd64"}
The connection to the server localhost:8080 was refused - did you specify the right host or port?

Download launchpad and install

vagrant@mgmt:~$ wget
vagrant@mgmt:~$ sudo mv launchpad-linux-x64 /usr/local/sbin/launchpad
vagrant@mgmt:~$ sudo chmod +x /usr/local/sbin/launchpad
vagrant@mgmt:~$ ls -laht /usr/local/sbin/launchpad
-rwxrwxr-x 1 vagrant vagrant 12M Apr 14 09:07 /usr/local/sbin/launchpad
vagrant@mgmt:~$ launchpad version
version: 1.2.1
commit: b137ab8

Build MKE

Now we are ready , use launchpad to build our MKE. Enter your user information before running launchpad as below:

vagrant@mgmt:~$ launchpad register
> Name ********
> Email ********
> Company ********
> I agree to Mirantis Launchpad Software Evaluation License Agreement Yes
INFO Registration completed!

Launchpad will be use the cluster configuration file (yaml) to build with, so we will need to create it.

Template we can create with vagrant@mgmt:~$ launchpad init > launchpad.yaml however the template is quite poor and needs to be adapted.

Generated template:

vagrant@mgmt:~$ cat launchpad.yaml
kind: mke
name: my-mke-cluster
- ssh:
user: root
port: 22
keyPath: ~/.ssh/id_rsa
role: manager
- role: worker
version: 3.3.7
version: 20.10.0
prune: false

Full configuration yml are below:

Let’s now launch our MKE using the launchpad. This can be done in two ways launchpad apply or launchpad apply --config mke.yml if your file name is different from launchpad.yaml because that is the default filename that is taken into account.

Output from console during installation

Access to cluster

After the installation is finished, we can get to our cluster. We should download client information for connection.

  • Via kubectl
vagrant@mgmt:/vagrant$ launchpad client-config --config mke.yml
INFO Note: The configuration has been migrated from a previous version
INFO to see the migrated configuration use: launchpad describe config
INFO ==> Running phase: Open Remote Connection
INFO [ssh] kube01.local:22: testing connection
INFO ==> Running phase: Detect host operating systems
INFO [ssh] kube01.local:22: is running Ubuntu 18.04.5 LTS
INFO ==> Running phase: Gather Facts
INFO [ssh] kube01.local:22: gathering host facts
INFO [ssh] kube01.local:22: is running mirantis container runtime version 20.10.0
INFO [ssh] kube01.local:22: using as private IP
INFO [ssh] kube01.local:22: is running "Ubuntu 18.04.5 LTS"
INFO [ssh] kube01.local:22: internal address:
INFO [ssh] kube01.local:22: gathered all facts
INFO [ssh] kube01.local:22: MKE has version 3.3.7
INFO ==> Running phase: Validate Hosts
INFO validating hostname uniqueness
INFO ==> Running phase: Download Client Bundle
INFO Successfully wrote client bundle to /home/vagrant/.mirantis-launchpad/cluster/mke-test-cluster/bundle/admin
INFO ==> Running phase: Close Connection
INFO [ssh] kube01.local:22: disconnected
vagrant@mgmt:/vagrant$ cd /home/vagrant/.mirantis-launchpad/cluster/mke-test-cluster/bundle/admin && eval "$(<" && cd ~
Cluster "ucp_kube01.local:6443_admin" set.
User "ucp_kube01.local:6443_admin" set.
Context "ucp_kube01.local:6443_admin" created.
vagrant@mgmt:~$ kubectl get nodes
kube01 Ready master 9m38s v1.18.14-mirantis-1
kube02 Ready <none> 7m21s v1.18.14-mirantis-1
  • Via web browser

Add entry in %SYSTEMROOT%\System32\drivers\etc\hosts kube01.local

Now we can open https://kube01.local/login/ and provide login and password which we defined in the mke.yml file. After logging in, we can request trial license.

Login page:


DevOps Consultant. I’m strongly focused on automation, security, and reliability.