Reputation: 147
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.
Upvotes: 4
Views: 208
Reputation: 18403
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
Upvotes: 5