Kubernetes (K8s)
Kubernetes (often abbreviated K8s) is an open-source container orchestration platform used to deploy, manage, scale, and heal containerized applications automatically. It was originally developed by Google and is now maintained by the Cloud Native Computing Foundation (CNCF).
Why use Kubernetes?
Instead of manually starting and monitoring Docker containers across multiple servers, Kubernetes can:
-
Automatically deploy applications
-
Scale applications up or down
-
Restart failed containers
-
Load balance network traffic
-
Perform rolling updates with no downtime
-
Roll back failed deployments
-
Manage secrets and configuration
-
Schedule workloads on the best available server
Kubernetes Architecture
Core Concepts
| Component | Purpose |
|---|
| Cluster | Collection of machines running Kubernetes |
| Node | A physical or virtual machine |
| Pod | Smallest deployable unit (one or more containers) |
| Deployment | Manages replicas and updates |
| Service | Stable network endpoint for Pods |
| Ingress | HTTP/HTTPS routing |
| ConfigMap | Configuration data |
| Secret | Passwords, API keys, certificates |
| Namespace | Logical isolation |
Example Deployment
Deploy it:
Useful Commands
Kubernetes vs Docker
| Docker | Kubernetes |
|---|
| Builds containers | Manages containers |
| Runs containers | Runs clusters of containers |
| Single host | Multiple hosts |
| Manual scaling | Automatic scaling |
| Basic networking | Advanced networking |
| No self-healing | Self-healing |
Docker (or another OCI-compatible runtime such as containerd) packages your application, while Kubernetes orchestrates those containers across one or more machines.
Popular Kubernetes Distributions
-
k3s – Lightweight, ideal for edge devices and home labs.
-
MicroK8s – Easy local development.
-
Minikube – Single-node Kubernetes for learning.
-
Amazon EKS – AWS managed Kubernetes.
-
Google GKE – Google Cloud managed Kubernetes.
-
Azure AKS – Microsoft Azure managed Kubernetes.
-
OpenShift – Enterprise Kubernetes platform.
Learning Path
-
Learn Docker.
-
Learn Kubernetes fundamentals (Pods, Deployments, Services).
-
Practice with Minikube or k3s.
-
Learn Helm.
-
Learn Ingress, Persistent Volumes, ConfigMaps, and Secrets.
-
Learn monitoring (Prometheus, Grafana).
-
Learn GitOps (Argo CD or Flux).
-
Prepare for the Certified Kubernetes Administrator (CKA) if you want a certification.
Since you're a C++ software engineer using Gentoo and local AI tooling, k3s is an excellent choice for building a lightweight Kubernetes cluster on your system without the overhead of a full enterprise installation. It integrates well with containerd and is well suited for self-hosted applications and AI services.