1. Declarative apply
apply -f reconciles the cluster to match the manifest, creating or updating as needed.
kubectl apply -f deploy.yamlTyporithm · easy
Step 1 of 8 · intro card
kubectl Commands
kubectl apply -f reconciles the cluster to a manifest declaratively; diff -f previews the change and delete -f removes it.
Declarative management means you describe the desired state in YAML and let kubectl apply make it so.
apply -f creates resources that do not exist and updates those that do, tracking changes you made.
diff -f previews the exact changes, and delete -f tears down precisely what the file declares.
apply -f reconciles to the manifest.
diff -f previews the change.
delete -f removes the file's resources.
kubectl apply -f deploy.yaml
kubectl diff -f deploy.yaml
kubectl delete -f deploy.yamlConnect each part of the code to the concept before you type.
apply -f reconciles the cluster to match the manifest, creating or updating as needed.
kubectl apply -f deploy.yamldiff -f shows what apply would change before you run it.
kubectl diff -f deploy.yamldelete -f removes exactly the resources defined in the file.
kubectl delete -f deploy.yamlRead the concept map and follow the code breakdown.
Type the implementation, repair mistakes and work through every recall exercise.
Use the final check without hints; revisit weak concepts in short practice sessions.