Skip to main content

Introduction to Kubernetes


1 - What is Kubernetes?

Kubernetes (often abbreviated K8s) is an open-source container orchestration platform originally developed by Google. It automates the deployment, scaling, and management of containerized applications.

Why "K8s"?

The name "K8s" comes from an abbreviation of Kubernetes: K + 8 letters + s. This convention is common in the tech world (i18n for internationalization, l10n for localization).

The problem Kubernetes solves

Without orchestration, managing containers quickly becomes complex:

ChallengeWithout KubernetesWith Kubernetes
DeploymentManual, custom scriptsDeclarative, automated
ScalingComplex, manual interventionAutomatic (HPA)
High availabilityManual configurationNative
UpdatesDowntimeRolling updates
RecoveryManual interventionSelf-healing

2 - History and evolution

Origins at Google

Kubernetes has its roots in Borg and Omega, Google's internal systems that manage billions of containers each week.

The Cloud Native Computing Foundation (CNCF)

In 2015, Google donated Kubernetes to the CNCF, a foundation that hosts many cloud-native projects:

  • Kubernetes - Orchestration
  • Prometheus - Monitoring
  • Envoy - Service mesh
  • Helm - Package manager
  • etcd - Distributed database

3 - Key concepts

The declarative model

Kubernetes uses a declarative model: you describe the desired state of your application, and Kubernetes ensures that state is maintained.

# Exemple : Déclarer un déploiement avec 3 réplicas
apiVersion: apps/v1
kind: Deployment
metadata:
name: mon-application
spec:
replicas: 3 # État souhaité : 3 instances
selector:
matchLabels:
app: mon-app
template:
metadata:
labels:
app: mon-app
spec:
containers:
- name: app
image: nginx:latest
ports:
- containerPort: 80

Main Kubernetes resources


4 - Use cases

Microservices

Kubernetes excels at deploying microservices architectures:

CI/CD and GitOps

Kubernetes integrates seamlessly into CI/CD pipelines:

  • GitHub Actions → Building Docker images
  • ArgoCD → GitOps deployment
  • Flux → Continuous Delivery

Batch Processing and Jobs

For batch workloads:

apiVersion: batch/v1
kind: Job
metadata:
name: data-processing
spec:
completions: 10
parallelism: 3
template:
spec:
containers:
- name: processor
image: data-processor:v1
restartPolicy: Never

5 - Kubernetes vs alternatives

Comparison with other orchestrators

CriterionKubernetesDocker SwarmNomad
ComplexityHighLowMedium
FeaturesVery comprehensiveBasicComprehensive
CommunityHugeMediumGrowing
EcosystemVery richLimitedGood
Learning curveSteepGentleMedium
Enterprise adoptionStandardLimitedGrowing

When to choose Kubernetes?

Kubernetes is ideal for:

  • Large-scale applications
  • Multi-cloud environments
  • Mature DevOps teams
  • High availability needs

Alternatives to consider:

  • Docker Swarm: For simple deployments
  • Nomad: For heterogeneity (VMs + containers)
  • ECS/Fargate: If 100% AWS

6 - The Kubernetes ecosystem


7 - Essential terminology

TermDefinition
ClusterA set of machines (nodes) managing containers
NodeA physical or virtual machine in the cluster
PodThe smallest deployable unit (1+ containers)
ServiceA network abstraction to access Pods
DeploymentManages the lifecycle of Pods
NamespaceLogical isolation of resources
kubectlCLI to interact with Kubernetes
ManifestA YAML file describing a resource

Summary

In this chapter, we discovered:

  • The origin of Kubernetes at Google (Borg)
  • The declarative model that defines the desired state
  • Use cases: microservices, CI/CD, batch
  • The rich ecosystem around Kubernetes
  • The core terminology to master

Next step

In the next chapter, we will explore in detail the Kubernetes architecture and the role of each component.

→ Next chapter: Kubernetes Architecture


← Back to the table of contents