# How can you see what kubectl apply -k would change in the cluster before applying it?

Kustomize, Medium (Advanced), Commands. https://k8wiz.com/uquiz/how-can-you-see-what-kubectl-apply-k-would-change-in-the-cluster-before-applying-it

- A. Run kustomize build --diff <dir>
- B. Run kubectl apply -k <dir> --preview
- C. Run kubectl kustomize <dir> --cluster
- D. Run kubectl diff -k <dir>

**Answer:** Run kubectl diff -k <dir>

**Explanation:** 'kubectl diff -k' builds the kustomization and compares it with the live objects using a server-side dry run. It exits with 1 when it finds differences, which CI jobs can check.
