Kubernetes (also called K8S) allows effective management of large container sets and automatizes many processes in software development. In just a few steps, it is possible to install a powerful and functional Kubernetes cluster.
Managed Kubernetes of Ionos Cloud
Orchestrate your workloads safely
Managed Kubernetes is the ideal platform for effective and highly scalable container applications.
Step 1: Prepare the system
In this tutorial, we take as an example a Kubernetes installation under Ubuntu.
To start, make sure the system is ready. To do this, open the terminal and first update the system to verify that all packages are up to date:
sudo apt update && sudo apt upgrade -y
bash
Then install the main utilities necessary for the installation of kubernetes and minikube. Then use the following command:
sudo apt install -y curl wget ca-certificates gnupg lsb-release
bash
These tools provide you with secure use of external sources as well as download and installation without difficulty other software packages.
Step 2: Install Kubectl
Kubernetes is based on two types of servers: the control knot (Control plane) and work nodes (workers). These do not necessarily need to be installed on separate physical machines. Thanks to virtual machines, it is possible to execute several Kubernetes nodes on a single computer. For tests, the free minikube tool is particularly practical, because it allows you to work locally with Kubernetes. As Minikube requires a virtual or docker machine, it therefore depends on a hypervisor or container software. The tool kubectl is also required.
Note
In this tutorial, we present the basics of Kubernetes with Docker. However, you can carry out the same operation using virtualization software like VirtualBox.
First, install Kubectl (CLI Kubernetes) on your system. This program is necessary for manage clusters.
curl -LO "https://dl.k8s.io/release/$(curl -Ls https://dl.k8s.io/release/stable.txt)/bin/linux/arm64/kubectl"
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
bash
Note
The installation controls depend on your system architecture.
Step 3: Install Docker
Before using Minikube, make sure that Docker is installed on your system. Inasmuch as runtime container, Docker allows Minikube toExecute Kubernetes cluster Without using virtualization software. Install Docker with the following command:
sudo apt install -y docker.io
bash
To use Docker without rights rootadd your user account to the Docker group:
sudo usermod -aG docker $USER
newgrp docker
bash
You will eventually have to log out and reconnect so that the modification is taken into account. Then check the installation with the following command:
docker run hello-world
bash
If a short confirmation message is displayed, this means that Docker is properly installed and ready to be used with Minikube.
Step 4: Install and start Minikube
In the next step, install Minikube In a compatible version and configure Docker as a pilot. First download the adapted minikube version, make the executable file, then move it to a system directory so that the command is available everywhere:
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-arm64
chmod +x minikube-linux-arm64
sudo mv minikube-linux-arm64 /usr/local/bin/minikube
bash
After installation, you can check that Minikube is properly configured with the following command:
Then start Minikube with the following command:
minikube start --driver=docker
bash
In this scenario, Minikube uses Docker as a container runtime and creates the Kubernetes cluster directly in the Docker environment. When starting, Kubectl should be configured automatically. To go from the command line to a graphical interface (GUI), run the following additional command:
The dashboard then opens in your default browser.


Compute Engine
The ideal IAAS solution to manage your workloads
- VCPU with advantageous costs and efficient dedicated hearts
- Without commitment for more flexibility
- Assistance by experts 24/7 included
Step 5: Use Kubernetes
At the start of Minikube, a cluster With a single node is created automatically. You can check it using a Kubectl command:
From the dashboard, you can now create deployments. Click on the « Create » button (top right) to open the web editor. In JSON or YAML formats, you can define a deployment. Once created, Kubernetes automatically generates several pods. You can then adjust the number of pods desired in putting the deployment on the scale. This option is accessible via the three -point button located next to the deployment.




You can also create deployments directly from the terminal. To do this, the content must first be integrated into a Docker image and have been deposited in a register.
kubectl create deployment --image=[chemin vers l’image]
bash
Numerous information can be obtained via orders entered in the command prompt.
What are the existing deployments?
kubectl get deployments
bash
How many pods are there?
What services are available?
What nodes are active?


Step 6: Publish the deployment
So far, you've just started your deployment, but you haven't published it yet. The publication is triggered by creating a service ::
kubectl expose deploy test-deployment
bash
However, this method only makes it possible to publish the service within the cluster. To be able to access deployment apart from the clusterit is necessary to add flags Additional:
kubectl expose deploy test-deployment --type=LoadBalancer --port=8080
bash
It is then possible to launch the service With minikube:
minikube service test-deployment
bash
If you want delete serviceyou can use the corresponding command:
kubectl delete service test-deployment
bash
In addition, it is possible to delete deployment ::
kubectl delete deployment test-deployment
bash
Finally, juststop the process To close Minikube:
If you no longer want to use the virtual machine or the container runtime, you can delete it.
The settings made and the deployments created will also be deleted. If you relaunch Minikube, you will then work with an empty cluster.

