Best Practice GCP - GKE | Multiple services

10/28/2019

We have different GCP projects namely for DEV/STAGE/PROD. In DEV project we do have two services running in one cluster as part of Phase 1, in custom VPC network and subnet.

As the project is expanding which is called as Phase 2, we would adding more services to the DEV GCP project where the services would go from 2 services to 6.

The discussion currently we are having was that for phase 2, whether to have the services in : - same cluster Or - different cluster

Considering the ingress rules, and page routing policies, it would be great if veterans can give some leads , which of the above approach would be good for the project?

-- Sunil
google-cloud-platform
google-kubernetes-engine

1 Answer

11/1/2019

You can use the same cluster. If you have insufficient resources to deploy all the pods you need for the various services, consider scaling up the cluster instead of creating a new one. You may also want to consider node pool autoscaling or node auto provisionning.

There are really only 2 limitations on the number of services in a cluster: the total number of k8s objects (this is somewhere near 300k~400k and is a limitation of etcd), and the number of service IPs provided at cluster creation (the secondary range you assigned for services).

Aside from the above two limitations, I don't really see much of a reason to create new clusters for the new services. If you have in house design requirements, that is different, but fomr a purely k8s or GKE point of view, you can definitely continue to use the same cluster.

-- Patrick W
Source: StackOverflow