0

Dev, Tst, Acc, Prd (DTAP) is about isolating multiple environments to ensure that data will not be mixed, e.g. production data in development or lost, e.g. database removal removes all production data. DTAP is also about environments that are identical, e.g. if a database in prd, then there should be a database in dev as well, but the data should not be mixed. It is about prediction. The more the environments are identical the bigger the change that if a certain change works in dev, then it will work in tst, acc and prd.

Discussion

There are at least two options, i.e. one k8s cluster or multiple.

one k8s cluster

  • Lower costs
  • Dangerous as pods from production environment could be removed, while the intention was to removed dev pods.

multiple k8s clusters

  • Higher costs
  • Lower change that data will be removed accidentally due to isolation
030
  • 13,383
  • 17
  • 76
  • 178

2 Answers2

2

Kubernetes supports namespaces.

multiple virtual clusters backed by the same physical cluster

These namespaces can allow you to use one cluster for all your environments. You can also do fancy things in your CI/CD pipeline so that each branch or each commit gets its own namespace. Those pods in prod namespace can still speak to pods in dev namespace unless you segment with NACL's. Just make sure you CNI supports that.

That being said most large companies I have worked for are running a cluster per environment.

I don't think there are right or wrong answers here. Do what you think is best for your company/team/workload/environment etc.

Levi
  • 1,084
  • 6
  • 18
1

Supplementary to @Levi's answer I would also advise you to consider where you plan to test changes to your Kubernetes cluster (any change that can impact how your cluster operates e.g: lifecycle). To satisfy this and provide another alternative to the mix, you could operates 2 clusters. One for your non-prod environment (dev, test and acc) and one for the prod environment. This has the added benefit of protecting your production cluster from getting clobbered from non production workloads.

kaizenCoder
  • 158
  • 4