<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>

<p>There is an interesting kubernetes project for this called <a href="https://cluster-api.sigs.k8s.io/" rel="nofollow noreferrer"><strong>cluster-api</strong></a> that lets you create, configure &amp; manage kubernetes clusters in a declarative fashion in a way similar to how we manage different resources in kubernetes itself. It defines new resources of different kinds like <em>Cluster</em>, <em>Machine</em></p>

<p>e.g. You could define a cluster like this:</p>

<pre><code>apiVersion: cluster.x-k8s.io/v1alpha2
kind: Cluster
metadata:
  name: capi-quickstart
spec:
  clusterNetwork:
    pods:
      cidrBlocks: ["192.168.0.0/16"]
  infrastructureRef:
    apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
    kind: AWSCluster
    name: capi-quickstart
</code></pre>

<p>Of course you would need a starting / bootstrap kubernetes cluster where you will deploy this resource. This project is still in prototype stage, so use caution.</p>

<p>Check out the <em>cluster-api</em> repository on Github: <a href="https://github.com/kubernetes-sigs/cluster-api" rel="nofollow noreferrer">https://github.com/kubernetes-sigs/cluster-api</a></p>
