How to setup minikube for testing?

Hi,

I’m trying to provide a minikube instance to use it during tests execution.

Unfortunately all my attempts failed so far.

(more links available but restricted to 2 max as i’m a new user)

they are all failing with various errors.
Anyone able to launch minikube? Or any other ways to have a Kubernetes instance available for testing on CircleCI?

regards,

I think using the K8s orb will probably be the easiest option: https://circleci.com/developer/orbs/orb/circleci/kubernetes

If that doesn’t work, I can definitely dig deeper into resources!

Hi,

thnaks for the suggestion. i wasn’t able to use the kubernetes orb neither.

I finally managed to have minikube working. Trying to share the main points:

  • requires to use a machine and not a docker image
  • use minikube vm-driver=docker
  • install conntrack (and iptables?)
  • install kubectl

I will share my branch when I will have finish to clean my config file and it will be merged in my master

2 Likes

Awesome! Thank you for sharing. I look forward to seeing updates. :smiley:

Hi Apupier minikube does require the machine executor in which you can use image ubuntu-2004:202010-01 then you can install + configure the system.

I would also suggest experimenting with microK8s which runs much smoother since it’s provided by Canonical.

1 Like

Thanks for the suggestion. In my case, our end-users are using more minikube, so preferred to stick with it.
After several attempts, I managed to slim down the configuration to have only few lines:

in a nutshell: use an image with .deb and docker vm-driver. it gives something like:

machine:
  image: ubuntu-2004:202010-01
steps:
  - run:
      command: |
        curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb
        sudo dpkg -i minikube_latest_amd64.deb
        minikube start --vm-driver=docker --kubernetes-version=v1.19.0

regards,

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.