GitOps is mainly aimed at working on production environments, which are bigger and more complex than the example local cluster we used in this chapter. In this section, we will describe how to use the advantages of Git to improve clarity in terms of deployments and changes, and how to be sure that we structure the different files under source control to avoid confusion.
Working in production
Creating structure
Structuring the YAML files is critical for a big deployment. Technically, you can join everything in a single file, but that's not the best way of handling it when it grows. Kubernetes allows a great deal of flexibility, so try to find a structure that works for you.
A simple one is to create subdirectories by...