<p>I am using cloud build and GKE k8s cluster and i have setup CI/CD from github to cloud build.</p>

<p>I want to know is it good to add CI build file and Dockerfile in the repository or manage config file separately in another repository? </p>

<p>Is it good to add Ci &amp; k8s config files with business logic repository?</p>

<p>What is best way to implement CI/CD cloud build to GKE with managing CI/k8 yaml files</p>

Harsh Manvar
<p>Yes, you can add deployment directives, typically in a dedicated folder of your project, which can in turn use a cicd repository</p>

<p>See "<a href="https://github.com/kelseyhightower/pipeline-application" rel="nofollow noreferrer"><code>kelseyhightower/pipeline-application</code></a>" as an example, where:</p>

<blockquote>
  <p>Changes pushed to any branch except master should trigger the following actions:</p>
  
  <ul>
  <li>build a container image tagged with the build ID suitable for deploying to a staging cluster</li>
  <li>clone the <a href="https://github.com/kelseyhightower/pipeline-infrastructure-staging" rel="nofollow noreferrer">pipeline-infrastructure-staging repo</a></li>
  <li>patch the pipeline deployment configuration file with the staging container image and commit the changes to the pipeline-infrastructure-staging repo</li>
  </ul>
  
  <p>The pipeline-infrastructure-staging repo will deploy any updates committed to the master branch.</p>
</blockquote>
