DevOps · Command
kubectl apply
kubectl apply creates or updates Kubernetes resources from YAML, JSON, standard input, or a Kustomize directory. It changes declared fields while leaving unspecified fields alone.
Last updated
Syntax
kubectl apply (-f FILENAME | -k DIRECTORY)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
kubectlkubectl apply edit-last-appliedkubectl apply set-last-appliedkubectl apply view-last-appliedkustomization.yaml