Deploying Different Images for Staging and Production Environment using Kubernetes and Gitlab

3/20/2018

I want to have two separate deployments for Staging and Production branches. I am using Kubernetes cluster in AWS. I have integrated the kubernetes cluster with gitlab. Right now I have setup only one environment which works fine by setting the -only parameter to staging in the .gilab-ci.yml file. Now I want to setup the production environment which will build from the master branch.

Will setting the -only parameter to master work or do I need to make additional changes as well in gitlab?
Also will separate images be created for the two branches or do I need to explicitly create two separate images for the master and staging branch. and if so what are the steps?

-- Anshul Tripathi
continuous-deployment
continuous-integration
docker
gitlab
kubernetes

0 Answers