What you will learn in this TP
- Deploy and expose an application
- Do a rolling update
- Roll back
Application lifecycle #
What you will learn in this section
- Deploy and expose an application
- Do a rolling update
- Roll back
Context. You must ship a new application version with no downtime and be able to roll back if it misbehaves. Kubernetes provides exactly that with Deployments: you practise on a disposable local cluster.
Prerequisites: Docker, kind, kubectl · Estimated time: 40 min
From manifest to zero-downtime update.1. Create the cluster and the Deployment
Why? A Deployment maintains N replicas: if a pod disappears the controller recreates it with no intervention, that is the reconciliation loop.
3 nginx 1.26 replicas with requests and a readinessProbe.2. Expose with a Service
Why? Pods change IP address: the Service provides a stable access point other applications can use.
Create a ClusterIP Service and test it with an ephemeral pod.3. Rolling update
Why? The rolling update replaces pods one by one: the application stays available throughout the update.
Move to nginx 1.27 and watch pods roll over.4. Rollback and scaling
Why? Rollback is possible because Kubernetes keeps old ReplicaSets: a bad version is fixed with one command.
Undo the update then scale to 5 replicas.
Difficulty level : ●●○○○ (2/5)
My progress
🧪 Launch the lab environment ↗
Sign in to track your progress and take notes. Sign in
💬 Questions about this lesson
No questions yet: be the first to ask for help or share your configuration.
Course Glossary
Kubernetes
An open-source container orchestration engine (sometimes called K8s) for automating the deployment, scaling, and management of containerized applicati...
Recommended Articles
Kubernetes: Pods, ReplicaSets and Deployments (deploying and updating)
Master Kubernetes workloads: anatomy of a pod, ReplicaSet, Deployment, RollingUpdate and Recreate...
kubectl cheat sheet: the essential commands
All the kubectl commands you need day to day: contexts, resources, logs, exec, port-forward, roll...
End-to-end CI/CD (4/5): deployment strategies and rollback
Deploy without downtime and without risk: recreate, rolling update, blue/green, canary, feature f...
Deployment strategies with Traefik: blue/green, canary and rolling
Implement deployment strategies with Traefik: rolling update by the orchestrator, blue/green by s...
Kubernetes: reliability and scaling (probes, resources, HPA, PDB)
Make an application resilient in Kubernetes: liveness, readiness and startup probes, requests/lim...
Kubernetes: exposing your applications (Services, Ingress and Gateway API)
Expose applications in Kubernetes: ClusterIP/NodePort/LoadBalancer Services, Ingress, IngressClas...
HAProxy in Kubernetes: the high-performance Ingress Controller
Discover in depth how HAProxy integrates with Kubernetes: direct-to-pod architecture, hot update ...
Container network security and Kubernetes networking
Secure the container network: how Docker and Kubernetes networking works, CNI, default-deny Netwo...
Ansible: managing your infrastructure with playbooks (Infrastructure as Code)
Write production playbooks: project structure, plays, handlers, tags, serial strategy, error hand...