Loading video player...
Whatβs the difference between kubectl create and kubectl apply in Kubernetes? These two commands are commonly used to create resources in a Kubernetes cluster, but they follow different approaches to managing infrastructure. In this short video, I explain the difference using a simple house-building analogy so the concept becomes easy to understand. πΉ kubectl create β Imperative approach You give Kubernetes a direct instruction to create a resource. If the resource already exists, the command fails. πΉ kubectl apply β Declarative approach You define the desired state of your infrastructure in a configuration file, and Kubernetes ensures the cluster matches that state. Understanding this concept is essential for anyone learning Kubernetes, DevOps, Cloud Engineering, or CI/CD pipelines. π‘ Quick recap: kubectl create β Create this resource kubectl apply β Make the system match this configuration π If you enjoy simple DevOps explanations, subscribe for more Kubernetes and Cloud content.