Skip to content
Français
Account: not signed in, sync available My learning
Select theme
Français

Getting started with Kubernetes: the fundamentals step by step

  • 10 min

By updated

Improve this page

Logo Kubernetes

This first module takes you, on your own machine and without any cloud, from knowing nothing about Kubernetes to an application that you deployed, exposed and diagnosed yourself. You install kubectl, the client that drives Kubernetes, then you create a local cluster with kind. You set which cluster kubectl talks to, you deploy a web server, then you read the state of what you launched. It is meant for a complete beginner in Kubernetes who already knows containers and can use a terminal.

What you will learn

  • Name the basic objects (Pod, Node, Deployment, Service) and say what each one is for.
  • Install kubectl while verifying the checksum of the binary, and pick a version compatible with the cluster.
  • Create a local Kubernetes cluster with kind.
  • Know which cluster kubectl talks to, thanks to the kubeconfig and contexts.
  • Deploy a first application and expose it with a Service.
  • Read the state of the cluster with kubectl get, describe, logs and top.
  • Check what you have learned with a quiz, then with a challenge that gives no step-by-step instructions.

What result should you expect at the end of the module?

At the end, you can do one precise thing: on a cluster that you created, deploy a web application in its own namespace, check that it answers from inside the cluster, and find the cause of a Pod in error by reading its state before fixing it. A final challenge checks this result against the real state of the cluster, without telling you which commands to type.

This result is deliberately narrow. The internal architecture, networking, storage and security come in the following modules. Here, the goal is to acquire the basic loop: understand, create, deploy, check.

In what order should you follow the lessons?

The lessons are meant to be followed in order, each one builds on the previous one.

The lesson why orchestrate containers answers the starting question: what an engine such as Docker cannot do as soon as there is more than one machine. The key concepts then give the minimum vocabulary (cluster, Node, Namespace, Pod, Deployment, Service). Without it, the following lessons look like a series of commands to copy.

You then install kubectl, the command-line client of Kubernetes: official binary verified by its checksum, version compatible with the cluster, autocompletion. With this tool in hand, you put the vocabulary into practice by creating your first cluster with kind, a Kubernetes 1.37 cluster ready in under a minute. The lesson kubeconfig and contexts explains how kubectl knows which cluster it talks to, which keeps you from typing a command on the wrong cluster.

On this cluster, the first deployment is the central lesson of the module: you deploy a web application, you expose it with a Service and you check that it answers. The lesson read the state of the cluster teaches you to observe what you deployed, with the four commands that matter as soon as a Pod does not start. The knowledge check ends the module with a review quiz that shows which topics to revisit, then with the challenge.

What prerequisites do you need before starting?

Two foundations make the module smoother. The first is to know what a container is and to run an image with Docker: Kubernetes orchestrates containers, it does not replace them. If that is not yet the case, the Docker course covers it. The second is to be comfortable in a terminal (moving around, running a command, reading its output), because everything is driven with the kubectl command line.

On the machine side, you need a Linux computer with Docker installed, sudo rights and about 2 GB of free memory for the single-node cluster of the module. kubectl itself is not a prerequisite: the module has you install it. The cluster runs entirely on your machine, no cloud access is needed.

The labs of the module (one per hands-on lesson, then the challenge) are played differently: with the dsoxlab CLI, in a virtual machine. They are all played on the same 4096 MB VM, the kind host, and not on one VM each. With dsoxlab 0.8.2 or later, dsoxlab start only brings up that VM; an older version requires the memory of the three machines of the catalogue and stops with code 2 if it is missing. uv tool upgrade dsoxlab updates the tool (or pipx upgrade dsoxlab if you installed it with pipx).

You therefore need a machine able to run a VM: a Linux computer, or the appliance set to 8192 MB. The guide choosing a machine helps you check yours, and sizing your machine details the calculation.

The kind host stays on at the end of the module, because start never tears down machines. In an appliance set to 8192 MB, the first kubeadm lab of the following modules asks for 4096 MB more: free the kind host first with dsoxlab destroy, then dsoxlab start <lab> brings up what is needed. The appliance should thus be able to play the labs of the training, one group of machines at a time: this is a calculation, and only the labs of this module were measured.

Why start with a local cluster?

A local cluster is created with one command and destroyed just as fast, and you can make mistakes on it at no cost: a failed deployment is deleted, a broken cluster is recreated. No cloud account and no bill are involved. The cluster you get with kind is standard Kubernetes, the one the certifications assess, not a simplified version.

Starting with the vocabulary before acting addresses another risk. Without it, every error message becomes a riddle. When you know that a Deployment manages Pods and that a Service exposes them, you read the documentation and incident reports with understanding, instead of copying commands at random.

Once you have mastered this loop, the next module, Kubernetes architecture, opens the hood: control plane, nodes and etcd.

Key takeaways

  1. Kubernetes orchestrates containers: knowing how to run an image with Docker is the prerequisite of the module.
  2. The basic vocabulary (Pod, Deployment, Service) lets you read the commands and error messages that follow.
  3. A local cluster created with kind is enough to learn, with no cloud and no cost, and it provides standard Kubernetes.
  4. The lessons are followed in order: understand, install kubectl, create the cluster, set the context, deploy, read the state.
  5. The review quiz points to the lesson to revisit, and the challenge checks that you can redo the path without guidance.
  6. The labs of the module are played with dsoxlab 0.8.2 or later, on the same 4096 MB VM. That VM must fit in the appliance set to 8192 MB as well as on a Linux computer, and dsoxlab destroy frees it before the following labs.