Episode 5 | Declarative vs Imperative in Kubernetes
Автор: Ahmed Moustafa
Загружено: 2025-11-25
Просмотров: 20
Описание:
In this episode, we explore one of the most important concepts in Kubernetes: declarative vs imperative object management. You will learn how kubectl create, kubectl scale, and kubectl annotate work in an imperative workflow, and how kubectl apply manages resources in a declarative and idempotent way.
We walk through a real example by creating an NGINX Deployment using both methods. You will see why imperative scripts often fail on repeated runs, and why declarative configuration gives you safer, predictable, and easier-to-manage Kubernetes objects. You will also learn how Kubernetes merges manifests, how the three-way diff works, and why declarative configuration is a key part of GitOps.
🔥 What you will learn
The difference between imperative and declarative configuration
How kubectl apply detects changes and updates resources
Why declarative manifests are idempotent
How Kubernetes stores the last applied configuration
Why mixing imperative and declarative commands can create problems
How this model connects to GitOps workflows
🧪 Commands and concepts covered
kubectl create
kubectl scale
kubectl annotate
kubectl apply
kubectl diff
Three-way merge
Live vs desired state
Removing fields and handling updates safely
This episode gives you the foundation you need before deep GitOps topics like Argo CD and Flux.
📚 References
Kubernetes Documentation – Declarative vs Imperative Management:
https://kubernetes.io/docs/concepts/o...
kubectl Apply Documentation:
https://kubernetes.io/docs/reference/...
Kubernetes Deployments:
https://kubernetes.io/docs/concepts/w...
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: