Deploying a Kubernetes cluster with microk8s
ro:Implementarea unui cluster Kubernetes cu microk8s
ru:Развертывание кластера Kubernetes с помощью microk8s
pl:Wdrażanie klastra Kubernetes za pomocą microk8s
ja:microk8sを使ったKubernetesクラスタのデプロイメント
zh:用microk8s部署一个Kubernetes集群
de:Bereitstellen eines Kubernetes-Clusters mit microk8s
nl:Een Kubernetes cluster implementeren met microk8s
it:Distribuire un cluster Kubernetes con microk8s
pt:Implementação de um aglomerado Kubernetes com microk8s
es:Despliegue de un clúster Kubernetes con microk8s
fr:Deployer un cluster Kubernetes avec microk8s
This article has been created by an automatic translation software. You can view the article source here.
Introduction
In this documentation we will see how to deploy and administer a kubernetes cluster with the microk8s solution.
The advantage of the latter is that it is an all-in-one solution that makes installation and administration of the solution much easier.
If you want to install kubernetes "directly" without this solution, you can see our FAQ suivante.
Setting up a cluster of this type requires at least three nodes, our example described in this page uses four that we will name here:
- microk8stest01
- microk8stest02
- microk8stest03
Type of equipment for this type of configuration
This type of configuration is feasible on all of Ikoula's solutions, whether it be:
- The dedicated solutions,
- The Flex virtual solutions,
If your need is to run microservices or a cluster with a large number of nodes, the solution Micro Server Raspberry PI is also possible.
Procedures
The whole procedure below is done on an Ubuntu 20.04 system.
===Installation== =
The installation of microk8s is very simple and is done as follows (add sudo su the command is not done as root):
snap install microk8s --classic
The installation and configuration will then be done automatically (about 2-3 minutes) and then provide the following output:
File:Microk8s01.JPG
===Setting up the cluster== =
Setting up the cluster is also as simple as this:
- Run the following command on one of the nodes (here 01):
microk8s add-node
You must then copy the command provided (if you have several IPs/networks, select the one allowing your servers to communicate with each other).
Then execute this command on your second server:
File:Microk8s03.JPG
Once the operation is completed for the second server, you must do the same operation for the third server (from the beginning in order to generate a new command via the add-node).
===Checking the state of the cluster== =
It is possible to check the status of the microk8s cluster via the command:
microk8s status --wait-ready
If everything is OK, you should get the following result:
File:Microk8s04.JPG
===Remove a node from the cluster == =
Removing a node from the cluster is done via the command:
microk8s leave
===Activation of the addons integrated in microk8s == =
The basic microk8s contains the following addons:
You can install / activate an addon simply via the command:
microk8s enable NOM_DE_LADDON
Cet article vous a semblé utile ?
Enable comment auto-refresher