/plushcap/analysis/spacelift/spacelift-kubectl-apply-vs-create

Kubectl Apply vs. Kubectl Create – What’s the Difference?

What's this blog post about?

The article discusses the differences between kubectl apply and kubectl create commands in Kubernetes. Declarative management is where we specify the required outcome without detailing individual steps, while imperative management involves giving a series of instructions to reach a goal. kubectl apply is a declarative command that applies a configuration to a resource by file name or stdin and creates it if it doesn't exist. On the other hand, kubectl create is an imperative command that creates a resource from a file or from stdin but errors if the resource already exists. The article provides usage examples for both commands on an Azure Kubernetes Service cluster (AKS).

Company
Spacelift

Date published
Oct. 21, 2022

Author(s)
Jack Roper

Word count
861

Language
English

Hacker News points
None found.


By Matt Makai. 2021-2024.