简体   繁体   中英

Kubernetes Cluster per app?

I have a two-cluster multi-region HA enabled in production working in MS Azure.

I was asked to reuse the same cluster to manage several new projects using Microservices.

What is the best practice here ? Should I create a cluster per app ? Is it better to isolate every project in different clusters and cloud account subcriptions?

Looking forward for opinions.

Thanks.

I would suggest you slice and dice your cluster by using Namespaces .You can easily create a namespace by using the following command.

kubectl create namespace my-project

Now you can feed your all manifest files (deployment, services, secrets, PersistentVolumeClaims) to API Server to that my-project namespace. for instance,

kubectl create -f my-deployment.yaml --namespace my-project

Do not forget to use namespace flag otherwise these manifest would be applied to the default namespace.

If you want to delete your project. you just need to delete the namespace.It will delete all of the resources related to that project.

kubectl delete namespace my-project

furthermore, You can limit the quota to each namespace for resources utilization.

you can further dig up with Namespace

Edited

Namespaces are virtual clusters in a physical cluster

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM