DevOps Kubernetes

Kubernetes Cluster Setup from Scratch – Full Installation with Kubeadm, Ubuntu Server and VirtualBox

Kubernetes cluster from scratch with Kubeadm, Ubuntu Server and VirtualBox: complete step-by-step installation.

Course description

Build Your Kubernetes Cluster from Scratch, for Real

Minikube is handy for learning, but a real cluster is a different story. In this course I show you how to install a multi-node Kubernetes cluster on Ubuntu Server virtual machines using Kubeadm — the same tool used in production. Every command comes with an explanation: no blind copy-paste.

What You'll Learn

  • Create and configure VirtualBox with Bridge networking for the Kubernetes lab
  • Install Ubuntu Server on a virtual machine step by step
  • VM backup and SSH key configuration
  • Access the VM via SSH
  • Disable swap (mandatory for Kubernetes)
  • Enable required kernel modules and configure sysctl for networking
  • Install and configure containerd as container runtime
  • Install kubeadm, kubelet and kubectl and hold automatic updates
  • Disable IPv6 to avoid networking issues
  • Initialize the cluster with kubeadm init and configure the Control Plane
  • Install Calico CNI and fix the NotReady node
  • Run the first Deployment and remove the Control Plane taint

A Real Lab, Not a Simulation

By the end you have a fully working Kubernetes cluster on your machine, built from the first command line. This is not Minikube: it's the same architecture you would find in the cloud, replicated locally.

Who It's For

Developers and DevOps engineers who already know Kubernetes and want to understand what's under the hood. Advanced level: assumes you already know what Pods, Deployments and kubectl are.

Lessons list

I'll show you how to prepare the lab environment for building a Kubernetes cluster from scratch by creating a virtual machine in VirtualBox and configuring the network in Bridge mode. We'll see why Bridge networking is essential for letting cluster nodes communicate as if they were physical machines on the same network.

Guarda lezione

Let's go through the Ubuntu Server installation inside a VirtualBox virtual machine, following every step of the guided setup process. I'll show you the right choices to make during installation to get a minimal, stable system ready to host Kubernetes components.

Guarda lezione

I'll explain how to back up the virtual machine in VirtualBox before proceeding with configuration, so you can roll back to a clean state if something goes wrong. We'll also generate an SSH key pair for secure, password-free access to the VM.

Guarda lezione

Let's connect to the Ubuntu Server virtual machine via SSH using the bridge network configured earlier. I'll show you how to find the VM's IP address, set up key-based authentication, and troubleshoot the most common connection issues.

Guarda lezione

I'll explain why Kubernetes requires swap to be disabled on the operating system and how to do it permanently on Ubuntu Server. We'll also go through the other initial preparation steps the node must meet before it can host Kubernetes.

Guarda lezione

Let's see how to enable the overlay and br_netfilter kernel modules required by Kubernetes for container networking. I'll walk you through the commands to load the modules at boot and verify they're correctly active on the node.

Guarda lezione

I'll explain how to configure sysctl parameters to enable IP traffic forwarding and network bridging between interfaces — two fundamental requirements for Kubernetes networking. We'll also make these settings persistent across system reboots.

Guarda lezione

Let's install and configure containerd as the container runtime for the Kubernetes cluster, setting up the configuration file with the correct cgroup driver. I'll walk you through every step, from the official repository to enabling the systemd service.

Guarda lezione

I'll show you how to add the official Kubernetes repository and install kubeadm, kubelet, and kubectl on the node. We'll also see how to lock automatic updates for these packages with apt-mark hold, preventing unwanted upgrades that could break the cluster.

Guarda lezione

I'll explain how to disable IPv6 at the network level on Ubuntu Server to prevent routing conflicts that can compromise Kubernetes functionality in lab environments. We'll make this setting persistent by editing the sysctl configuration file.

Guarda lezione

Let's initialize the Kubernetes cluster's Control Plane with the kubeadm init command, specifying the Pod network and API server address. I'll explain what happens during initialization and how to configure kubectl to interact with the newly created cluster.

Guarda lezione

I'll show you how to install Calico as the CNI (Container Network Interface) to enable networking between Pods in the Kubernetes cluster. We'll see why the node stays in NotReady state without a CNI and how to verify that Calico is operational after installation.

Guarda lezione

Let's complete the Kubernetes lab setup by running the first Deployment to verify the cluster is working correctly. I'll also explain how to remove the Control Plane taint to allow the scheduler to assign Pods to the master node in a single-node environment.

Guarda lezione
Giovanni Pace

Giovanni Pace

Ingegnere Informatico · Pratola Peligna

  • 107 Courses
About the teacher

Sono un ingegnere informatico con oltre 15 anni di esperienza nel settore ICT. Mi occupo di sviluppo software, cybersecurity, data science e intelligenza artificiale, con particolare attenzione all’innovazione e all’automazione dei processi aziendali. Da anni svolgo anche attività di docenza e formazione, creando percorsi pratici e coinvolgenti su programmazione, DevOps, AI e sicurezza informatica.

This course includes

  • Lessons 13
  • Duration 2h 34m
  • Difficulty advanced
  • Language it
  • Certificate No

Recently viewed