Kaniko with Tekton Pipeline: Nexus Registry Push Error "404 Not Found"
I work at a corporate company where our network is intranet-based. We are using Nexus as our Docker registry and I am writing a pipeline in Tekton. In the pipeline, I am using Kaniko and have created the necessary config.json for Kaniko. However, when running the pipeline, I encounter the following error:
error checking push permissions -- make sure you entered the correct tag name, and that you are authenticated correctly, and try again: checking push permission for "nexus.example.com/project-name:image-tag": creating push check transport for nexus.example.com failed: GET https://nexus.example.com/v2/: unexpected status code 404 Not Found
Here are the YAML configurations for the volume and Kaniko:
volumes:
- name: nexus-secret
secret:
items:
- key: .dockerconfigjson
path: config.json
secretName: nexus
steps:
- name: build-sources
image: gcr.io/kaniko-project/executor:latest
workingDir: /workspace/source/$(params.project-name)
volumeMounts:
- name: nexus-secret
mountPath: /kaniko/.docker
- name: kaniko-ssl
mountPath: /kaniko/ssl/certs
env:
- name: DOCKER_CONFIG
value: /kaniko/.docker
command:
- /kaniko/executor
args:
- --dockerfile=/workspace/source/$(params.project-name)/Dockerfile
- --context=/workspace/source/$(params.project-name)
- --destination=$(params.nexus-url)/$(params.project-name):$(params.image-tag)
- --verbosity=debug
The config.json file was created using the following commands and contains:
{
"auths": {
"nexus.example.com": {
"username": "my-username",
"password": "my-password"
}
}
}
What I have tried:
Ensured that the config.json is correctly created and that I have the necessary permissions on Nexus.
Manually verified that the Nexus URL is correct.
Verified that Kaniko is correctly configured and that the necessary SSL certificates are present.
Problem: I am looking for a solution to this error and guidance on how to successfully push to the Nexus Registry using Kaniko. Can anyone help?
I'm having the same issue. this is related to docker limitations: https://help.sonatype.com/en/docker-registry.html#docker-port-scalability what possibilities do you have: https://help.sonatype.com/en/docker-repository-reverse-proxy-strategies.html
my deployment is on microk8s and i'm trying to use nginx ingress to rewrite the URL, but so far without success. if that doesn't work, i'll try port connector