Should I run my testing environment in the same Kubernetes cluster as my production environment?

8/5/2020

I am planning on deploying my services on digitalocean's managed Kubernetes Service and I'm trying to determine which is the best approach when working with testing and production environments. These are the approaches I'm considering:

  1. Have one performant cluster on which I create 2 namespaces prod and test to run the 2 environments on the same cluster.
  2. Have one cluster entirely dedicated to my production environment and another cluster with lower specs that's dedicated to testing.

Is one of these approaches preferred/recommended or is it very subjectve? Feel free to suggest a completely different approach if the one's I have suggested aren't good!

Thank you for your time, Eliot

-- eliotmkb
digital-ocean
kubernetes
production-environment

1 Answer

8/5/2020

always prefer to go with two isolate cluster would be good option. but it will cost you. if you want use one cluster for both environment. you could isolate physical resource but not traffic(Istio would help). you could isolate by using hardcode resource quota to test env. to avoid consume Prod. resource and always use limit to all deployment and use nodeaffinity to limit your test env.

  1. Resource quota - Namespace
  2. Request limit - Deployment
  3. Nodeaffinity - Node
-- RV Sai
Source: StackOverflow