Kubernetes & kubectl Cheat Sheet/Apply all manifests in directory

Recursively apply manifests from a directory.

Section: Declarative Apply, Edit, and Replace

Apply all manifests in directory

bash
bash
kubectl apply -f k8s/
Explanation

Recursively apply manifests from a directory.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Declarative Apply, Edit, and Replace
Apply manifest file
Create or update a resource from a file.
OpenIn sheetbashsame section
Apply recursively
Apply manifests recursively from nested directories.
OpenIn sheetbashsame section
Apply manifest from URL
Apply a manifest hosted remotely.
OpenIn sheetbashsame section
Preview apply changes
See server-side differences before applying.
OpenIn sheetbashsame section
Replace resource from file
Replace an object using the manifest definition.
OpenIn sheetbashsame section
Edit resource live
Open a live editor against the API server.
OpenIn sheetbashsame section