How do I get the Onedev Kubernetes Executor working in a microk8s helm deployment?

33 Views Asked by At

I am quite new in the Linux side of things with setting up servers etc. I have set up a Kubernetes cluster in microk8s and have deployed Onedev in the cluster. I don't have an ingress or any certificates, and am accessing Onedev via an exposed service by IP.

The problem I'm encountering is when setting up a Kubernetes executor in Onedev to run jobs, I am faced with the following:

First it tries to start the job container: job starting

and then it fails with the following error:

init: failed to pull and unpack image "docker.io/1dev/k8s-helper-linux:2.12.1": failed to resolve reference "docker.io/1dev/k8s-helper-linux:2.12.1": failed to authorize: failed to fetch oauth token: unexpected status from GET request to https://auth.docker.io/token?scope=repository%3A1dev%2Fk8s-helper-linux%3Apull&service=registry.docker.io: 401 Unauthorized

What I've tried so far:

  1. Removing the port in Onedev Administration System Settings.
  2. Changing the same port to the Kubernetes cluster IP.
  3. Installing kubectl and getting it to work without prefixing "microk8s".
  4. Adding a cluster role and using that in the kubernetes executor setup.

ps. It can't be my dockerhub credentials as those are working just fine with a docker executor in Onedev.

I've tried searching if anyone's encountered the same problem, but to no avail. Your help would be greatly appreciated.

1

There are 1 best solutions below

0
Joedahond On

I solved the issue by removing all dockerhub credentials as I'm only pulling public images.