Gitlab CI - create cluster, run pods, run app in pod, run tests, and then delete cluster

4/15/2019

I have a small question. Is it possible to create by gitlab CI ( gitlab-ci.yml), kubernetes cluster with pods to integration tests? I need to run ~10 pods with databases etc and after that run my app’s test. After tests i need to remove all created before pods and send feedback about to gitlab ci.

Is this flow possible? Best! :slight_smile:

-- Oskar Polak
gitlab
gitlab-ci
gitlab-ci-runner
kubernetes

1 Answer

4/15/2019

If you are using GKE it seems gitlab-ci has a nice integration with it.

In my case as a AWS user I found kops facilitates a lot the setup of a cluster. I found a script that automates everything you need in AWS. There is also a good tutorial here. Tools like Terraform may be also useful.
Besides all that, because your cluster is temporary it might be a good idea to just use minikube if your requirements don't include multiple nodes and automated load testing.

-- victortv
Source: StackOverflow