Can't run 'make deploy' for k6 operator

I’m following the tutorial from this article: Running distributed k6 tests on Kubernetes

I’ve gotten to the point of running ‘make deploy’, but I get the following error:

root@vm-ubuntu-20:~/k6-operator$ make deploy
go: creating new go.mod: module tmp
/home/root/go/bin/controller-gen "crd:trivialVersions=true,crdVersions=v1" rbac:roleName=manager-role webhook paths="./..." output:crd:artifacts:config=config/crd/bases
cd config/manager && /snap/bin/kustomize edit set image
/snap/bin/kustomize build config/default | kubectl apply -f -
The connection to the server localhost:8080 was refused - did you specify the right host or port?
make: *** [Makefile:81: deploy] Error 1

This might be really obvious, but I can’t seem to get this working.

Found out the issue. I didn’t have any contexts available: with kubectl config get-contexts

I ran a personal cluster with minikube and that fixed the issue.

I would suggest the tutorial is updated to reflect this gap. I’m not familiar with Kubernetes, so missing that context slowed me down a lot.

1 Like