The Kubernetes software enables you to manage large quantities of containers and helps you with a range of automatic functions. In this way, Kubernetes – also known as K8s – has created a mini revolution in software development. To benefit from this system, we take you through the most important steps – from installation through to your first cluster.
The easy way to manage container workloads. Fully automated Kubernetes cluster setups and maximum visibility and control of K8s clusters.
Persistent Storage
24/7 expert support
Automated cluster setup
Kubernetes: Installation & Getting Started
Kubernetes works with various servers: masters and nodes. They don’t necessarily have to be on separate physical servers. Virtual machines also enable you to activate multiple Kubernetes nodes on a computer. The free program Minikube has proved to be especially effective for test purposes. It also allows you to work with Kubernetes locally. Since Minikube creates a virtual machine, the program requires a hypervisor. To use it, you’ll therefore need to have installed a program like VirtualBox. The Kube Control tool is also necessary.
Note
This Kubernetes tutorial explains the installation steps for Ubuntu. But it’s also possible to run Kubernetes on Windows or macOS. The official guide also contains solutions in this regard.
Installing Kube Control
First, install Kubectl on your system. You’ll need this program to manage clusters.
When you start Minikube, Kubectl should automatically be configured correctly. Enter another command to switch from the command line to a GUI. This opens the dashboard in the standard browser.
minikube dashboard
The dashboard provides you with a clear graphical interface.
Tip
If you wish to go without installing Kubernetes on your system, you can also access a developers’ web terminal. Here, you can then learn the ins and outs of Kubernetes using an interactive tutorial.
Using Kubernetes
After starting Minikube, the program automatically creates a cluster with a single node. You can check it with a Kubectl query:
kubectl get nodes
You can create deployments using the dashboard. Click on the “Create” button (top right) to access an online editor. There you’ll be able to create a deployment in JSON or YAML format. Once you’ve done this, Kubernetes will automatically generate multiple pods. You can adjust the desired amount by scaling the deployment. This function is located next to the deployment in the form of a “more options” button (with three dots).
The dashboard provides an overview of all deployments and pods.
If you need more than three pods, it’s easy to scale the deployment.
Alternatively, you can also generate deployments via the terminal. However, the content needs to be already integrated in a docker image placed in a repository.
kubectl create deployment --image=[pathway to image]
You can pull up a range of information using the command line.
What deployments are there?
kubectl get deployments
How many pods are there?
kubectl get pods
What services are there?
kubectl get services
Which nodes are active?
kubectl get nodes
A range of information can also be obtained via the command-line instructions.
You’ve so far started your deployment, but not yet released it. To release it, you’ll need to create a service:
kubectl expose deploy test-deployment
However, entering this code only releases the service within the cluster. In order to access the deployment beyond the cluster, extra flags are necessary:
If you want to delete the service again, there’s also a command for that:
kubectl delete service test-deployment
The deployment can also be deleted:
kubectl delete deployment test-deployment
In order to end Minikube, you need to stop the process:
minikube stop
And if you no longer wish to work with the virtual machine, you can also remove that.
minikube delete
Afterwards, any configured settings as well as created deployments and pods will also be deleted. If you launch Minikube again, you’ll start with an empty cluster again.
IONOS Cloud Compute Engine
Medium-sized and large companies choose the cloud from Germany. IaaS and PaaS are services for champions.
The open source container platform Docker is quite exciting to the open source community. As an alternative to hardware virtualization based on virtual machines, Docker has made the use of software containers acceptable outside of the Linux universe. In our tutorial for beginners, we break down the Docker trend from the ground up. With these clear, step-by-step instructions, learn how to install...
The Scala-based streaming and messaging software Apache Kafka is one of the most popular solutions for efficiently storing and processing large data streams. In this Kafka tutorial, you will learn the requirements for using this open source software and how best to install and set up Apache Kafka.
Kotlin tutorial: The first steps with the new programming language
Web development
In recent years, Kotlin has developed more and more into an alternative to Java. Developers of Android apps especially like the lean programming language. Do you want to know how to implement data classes or functions in Kotlin? Take your first steps with this Kotlin tutorial and learn the most important tricks with the programming language.
If you’re happy with Docker and are already using the container visualizer, you might have thought about trying Kubernetes. But are these two systems actually rivals? Is it a case of Kubernetes vs. Docker? On the contrary, both work really well together. But the container pioneer now also offers its own tool for orchestration with Docker Swarm. So, which is better?
Docker and Kubernetes are well-known technologies that are used for container-based virtualization. With CRI-O there is now a bridge between the Container Runtime Interface (CRI) and the existing runtime environments and container images of the Open Container Initiative (OCI). Find out how CRI-O works in this article.