Skip to content
masterclass Buddy

Kubernetes · Command

kubectl apply

kubectl apply creates or updates Kubernetes resources from YAML or JSON. It accepts files, standard input, or a Kustomize directory.

Last updated

Syntax

kubectl apply (-f FILENAME | -k DIRECTORY)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • kubectl
  • kubectl apply edit-last-applied
  • kubectl apply set-last-applied
  • kubectl apply view-last-applied

Source: kubectl apply | Kubernetes. Checked 2026-11-03.