I am currently looking for ways to start a minimal k8s (k3s) inside a pipeline and run my application tests against it. I have looked into this https://github.com/rancher/k3d and then thought maybe I could do something like:
- name: e2e-test image: docker environment: - DOCKER_HOST=unix:///drone/docker.sock commands: - sleep 10 - curl -s https://raw.githubusercontent.com/rancher/k3d/master/install.sh | bash - k3d create - export KUBECONFIG=$(k3d get-kubeconfig) - make e2e # could be run here, although I would need golang to be available in my image - k3d delete services: docker: image: docker:dind privileged: true command: [ '-H', 'unix:///drone/docker.sock' ]
So, any recommendations? would it make sense to create an image for k8s/test step that includes both docker and Golang (my e2e tests are written in Go)?