To configure GitLab chart with a private Nexus registry for images, you will need to do the following:
- Create a Kubernetes secret for your Nexus registry credentials:
kubectl create secret docker-registry nexus-registry \
--docker-server=<your-nexus-registry-url> \
--docker-username=<your-nexus-registry-username> \
--docker-password=<your-nexus-registry-password> \
--docker-email=<your-email-address>
- Update the
values.yamlfile for the GitLab chart to include theimagePullSecretsfield, which references the secret you just created:
global:
imagePullSecrets:
- name: nexus-registry
- Update the
values.yamlfile for the GitLab chart to include theregistryfield, which specifies the URL of your Nexus registry:
gitlab:
registry:
enabled: true
host: <your-nexus-registry-url>
- If you are using a self-signed certificate for your Nexus registry, you will need to add the certificate to the GitLab Runner’s trusted certificates. You can do this by adding the certificate as a Kubernetes secret and updating the
values.yamlfile for the GitLab Runner chart to include theextraVolumesandextraVolumeMountsfields:
gitlab-runner:
runners:
config: |
[[runners.kubernetes.volumes.hostPath]]
name = "certs"
hostPath = "/etc/gitlab-runner/certs"
mountPath = "/etc/gitlab-runner/certs"
readOnly = true
extraVolumes:
- name: certs
secret:
secretName: nexus-registry-certs
extraVolumeMounts:
- name: certs
mountPath: "/etc/gitlab-runner/certs"
readOnly: true
- Create a Kubernetes secret for your Nexus registry certificate:
kubectl create secret generic nexus-registry-certs \
--from-file=<path-to-certificate-file>
- Install the GitLab chart and the GitLab Runner chart with the updated
values.yamlfiles:
helm install gitlab gitlab/gitlab -f gitlab-values.yaml
helm install gitlab-runner gitlab/gitlab-runner -f gitlab-runner-values.yaml
After following these steps, GitLab and GitLab Runner will be configured to use your private Nexus registry for images.
I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services — all in one place.
Explore Hospitals