I would like to deploy my projects (api rest, webapp, backoffice etc...) in several environments (dev, staging and production) with gitlab-ci, Kubernetes and Google Kubernetes Engine.
All projects are separated in gitlab repositories
I have 2 branch on gitlab : master and develop. Master must be deploy in staging and production environment Develop must be deploy in dev environment
I read multiple tutorials and blogs since 2 days but I didn't found what is the best approach to manage several environments with kubernetes.
I have to create 3 clusters in GKE (dev, staging, production) ? or I have to create just 1 cluster and use namespace to manage my environments ? or others solutions ?
1 / Create 3 clusters In gitlab-ci (free account), how can I deploy dev branch on dev cluster, master branch on staging/production cluster ? what will be the config to do it ? Can I set a specific cluster in gitlab-ci.yml ? How ? (kubectl config use-context ?
2 / Create 1 cluster and 3 namespace (dev,staging, production) I don't think that is the best approach for security and performance reason, right ?
Thanks