-
Seems that dockerhub now requires login even for public images. Please workaround this by creating a Kubernetes executor in
Administration / Job Executorsand specify your login to DockerHub.PS: I created a k8s cluster on google cloud, and it does not require login. Not sure how gke handles dockerhub login requirement...
-
I have done this, but still getting the same error:

-
This is quite odd. Please login to the k8s node, and pull image 1dev/k8s-helper-linux:2.12.7 (assuming you are running latest OneDev version) manually to see what happens.
-
Sorry ought to be
1dev/k8s-helper-linux:2.12.1(no need to run latest OneDev version). -
I've pulled the image from the node, and it seems to work just fine (I'm using the same dockerhub credentials on this server)

-
Believe this is an issue with dockerhub. Sometimes I get unauthorized error when pull public image from terminal. Maybe it is due to their rate limit control.
-
Will host the helper image to some other places in future versions. For now, if you have some places to host the helper image, you may push it there, and map the helper image to your location in k8s executor image mapping setting.
-
Previous Value Current Value Open
Closed
-
k8s-helper image now hosts on code.onedev.io in version 10.2.0. I am closing this issue.
-
Hi Robin, thanks so much for the assistance. However, I am still getting the same problem after updating to the latest onedev version:

-
Previous Value Current Value Closed
Open
-
Seems that your cluster has issues downloading images from docker. You may test with below steps:
- Create a test namespace by running
kubectl create namespace test - Download test.yaml
- Run command
kubectl apply -f test.yaml - Run command
kubectl logs test -n testto see if it works
- Create a test namespace by running
-
That seemed to work:

-
Could it be possible that the registry login credentials are specified incorrectly in k8s executor? You may remove registry logins from the executor and test again.
-
Wow that worked! I completely removed the registry login and it works perfectly, thanks.
Could it be that the registry logins are not being passed correctly? Because I used the exact same details in a docker executor and it worked.
-
Please create a file config.json with below content:
{ "auths" : { "https://index.docker.io/v1/" : { "auth" : "<base64 encoding of docker credential>" } } }Here
<base64 encoding of docker credential>should be replaced with output of below command:echo -n "docker-user-name:docker-password" | base64Then run below command to get base64 of config.json:
cat config.json | base64Then create a file
secret.yamlwith below content and replace<base64 of config.json>with above output:apiVersion: v1 kind: Secret metadata: name: image-pull-secret namespace: test data: .dockerconfigjson: <base64 of config.json> type: kubernetes.io/dockerconfigjsonRun command
kubectl apply -f secret.yamlto create the secret into test namespaceThen modify
test.yamlwith below content, replacing<some private image>with a real image at dockerhub:apiVersion: v1 kind: Pod metadata: name: test namespace: test spec: containers: - args: ["-c", "echo it works"] image: <some private image> name: test command: [sh] restartPolicy: Never imagePullSecrets: - name: image-pull-secretNow run
kubectl apply -f test.yamlagain and check the log to see if it works. -
I get this error:
root@Milan7763-15103:/home/josh/onedev# kubectl logs test -f -n test Error from server (BadRequest): container "test" in pod "test" is waiting to start: trying and failing to pull imageAnd the pod is failing to start:

-
I get this error:
root@Milan7763-15103:/home/josh/onedev# kubectl logs test -f -n test Error from server (BadRequest): container "test" in pod "test" is waiting to start: trying and failing to pull imageAnd the pod is failing to start:

This was with the public postgres image
-
This is a very simple test not related to OneDev. I guess something wrong with your k8s setup. Sorry that I am not a k8s expert. But you at least need to make this simple test working.
-
kubectl get events -n testmay give you detail info of why image pull are failing -
My main problem was just not being able to run a job, so now that I can I'm happy. I will investigate the problem with my k8s cluster.
Thanks @robin
-
Previous Value Current Value Open
Closed
| Type |
Question
|
| Priority |
Minor
|
| Assignee | |
| Labels |
No labels
|
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:
and then it fails with the following error:
What I've tried so far:
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.