I’m trying to run minikube in CircleCI via a job with a machine executor and I’ve run into a few problems that I’m hoping someone on here can clear up.
This seems to be completely possible with CircleCI 2.0, and there’s a repo on GitHub that demonstrates this. I forked the repo and tested it myself and can confirm that it works, however I tried to replicate it in CircleCI 2.1 and I’ve run into two issues.
The first one might not affect my end result at all, but it is curious. I can’t seem to specify a machine image in 2.1. While the YAML is perfectly valid I get the following error at the start of the job:
Error pulling image circleci/classic:201808-01
machine: true in the job definition does get past the error, but I encounter the major issue later on in the job.
It seems that I can’t access
minikube needs in order to start properly in whatever machine image the job is using. I discovered this when I debugged the job via SSH, I could not access
systemctl even as root. This causes
minikube start ... and ultimately the job to fail.
I should note that I’m running a test job via
circleci local execute -c <file> --job <job>. Where
<file> is the result of performing
circleci config process <original>.
I suppose a possible workaround would be to look into running minikube in docker and use that as a service to test against when performing kubernetes integration tests.
Could it be that
circleci local execute doesn’t handle a
machine executor image properly? Running in locally on my machine results in the same issue.