Difference Between kubectl apply and kubectl create

Date: 2024-02-21
kubectl apply
and kubectl create
are Kubernetes command-line tools for managing cluster resources. kubectl create
is used for one-time resource creation, while kubectl apply
creates resources if they don't exist and updates them if they do, using declarative YAML or JSON configuration files. kubectl apply
is preferred for ongoing resource management due to its ability to handle updates, making it more efficient for managing evolving configurations. kubectl create
is simpler for single-creation tasks. The choice depends on the specific use case.
Read more: https://examples.javacodegeeks.com/difference-between-kubectl-apply-and-kubectl-create/
Subscribe to my newsletter
Read articles from Yatin B. directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
