<p>Can anyone point me to the common strategy to setup a Kubernetes cluster according to the principles of <strong>infrastructure as code</strong> and <strong>automatic deployment</strong> for different developer teams with Git repos and an undefined CI/CD platform.</p>

<p>Let's say I am going to use Terraform to deploy a Kubernetes cluster on a hypothetical cloud service named QKS with a commonly used service, for example Apache Airflow, for which a public helm chart is available. There are two custom services (from two independent developer groups) to deploy named "apples" and "bananas".</p>

<p>I am struggling with the separation of responsibilities of different code bases. Which steps in this process can best still be done manually. A lot is being written about this technology, but I cannot find any articles on this issue in particular.</p>

Joost Döbken
<p>This is my own proposal.</p>

<p>Have three git repositories:</p>

<ul>
<li><em>my-infrastructure</em>: includes the Terraform files, the Airflow Helm deployment and deployment of two namespaces included access roles to these namespaces. CICD tracks for changes and deploys them on QKS</li>
<li><em>apples</em>: code base and corresponding helm template. CICD can deploy on the apples namespace only.</li>
<li><em>bananas</em>: code base and corresponding helm template. CICD can deploy on the bananas namespace only.
<a href="https://i.stack.imgur.com/Pu7y6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Pu7y6.png" alt="enter image description here"></a></li>
</ul>

<p>Notes:</p>

<ul>
<li>subdivision of the cluster into namespaces <a href="https://kubernetes.io/docs/tasks/administer-cluster/namespaces/" rel="nofollow noreferrer">is obvious</a>;</li>
<li><p>all secrets and authorization tokens for the namespaces can be created via Terraform using Terraform kubernetes provider.</p>

<p><a href="https://www.terraform.io/docs/providers/kubernetes/r/secret.html" rel="nofollow noreferrer">https://www.terraform.io/docs/providers/kubernetes/r/secret.html</a></p></li>
</ul>
