Managing Directories
Updated Apr 19, 2022 ·
The Problem with Too Many YAML Files
When all YAML files are in one folder, applying them is easy. For example:
project-abc/
├── api-deployment.yaml
├── api-service.yaml
├── db-deployment.yaml
└── db-service.yaml
You can apply all these YAMLs at once using:
kubectl apply -f project-abc/
As the number of YAML files grows, keeping them in one place becomes messy. It's best to split them into subdirectories for better organization:
project-abc-configs/
├── api/
│ ├── deployment.yaml
│ └── service.yaml