Continuous Integration

How to run minikube in CI (Continuous Integration)

Overview

Most continuous integration environments are already running inside a VM, and may not support nested virtualization. You could use either none or docker driver in CI.

To see a working example of running minikube in CI checkout minikube-ci/examples that contains working examples.

Supported / Tested CI Platforms

For any platform not yet listed we are looking for your help! Please file Pull Requests and / or Issues for missing CI platforms 😄

Platform Known to Work? Status
Prow Yes ✔️ Prow
Google Cloud Build Yes ✔️
GitHub Yes ✔️ GitHub
Azure Pipelines Yes ✔️ Azure Pipelines
Travis CI Yes ✔️ Travis CI
CircleCI Yes ✔️ CircleCI
Gitlab Yes ✔️ Gitlab

Example

Here is an example, that runs minikube from a non-root user, and ensures that the latest stable kubectl is installed:

curl -LO \
  https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \
  && install minikube-linux-amd64 /tmp/
  
kv=$(curl -sSL https://dl.k8s.io/release/stable.txt)
curl -LO \
  https://dl.k8s.io/$kv/bin/linux/amd64/kubectl \
  && install kubectl /tmp/

/tmp/minikube-linux-amd64 config set WantUpdateNotification false
/tmp/minikube-linux-amd64 start --driver=docker

Last modified September 16, 2024: remove deadlink (f33a321ef)