How to run GitLab in Kubernetes with an existing cert-manager

Published 12.04.2021

Author Fabian Peter

Categories Engineering

Assuming you have an existing cert-manager and nginx in your Kubernetes cluster, the GitLab Helm Chart needs a few tweaks to make use of your existing infrastructure and the ingress.

If you start from scratch, check the following posts to learn how to setup a Kubernetes cluster and install cert-manager and nginx:

Install GitLab

The following steps are taken from the official documentation.

First, add the GitLab Helm repository to your local Helm installation and get the default values for GitLab’s configuration.

helm repo add gitlab https://charts.gitlab.io/
helm repo update
helm get values gitlab > gitlab.yaml

Then, adjust the default values to match your installation (and make use of the existing components).

Note: we disable the built-in nginx and cert-manager and provide the necessary annotations to the chart so all GitLab deployments can make use of our existing ingress and tls infrastructure.

      nginx-ingress:
        enabled: False
      global:
        ingress:
          configureCertmanager: False
          class: nginx
          annotations:
            kubernetes.io/tls-acme: True
            kubernetes.io/ingress.class: "nginx"
            cert-manager.io/cluster-issuer: "letsencrypt-prod"
            acme.cert-manager.io/http01-ingress-class: "nginx"
        hosts:
          domain: "YOURINGRESSDOMAIN"
      gitlab:
        webservice:
          ingress:
            tls:
              secretName: gitlab-tls
      registry:
        ingress:
          tls:
            secretName: registry-tls
      minio:
        ingress:
          tls:
            secretName: minio-tls
      certmanager:
        install: False
      postgresql:
        install: True

Now just install the chart using Helm.

helm upgrade gitlab gitlab/gitlab -f gitlab.yaml

Join the club,

stay in the loop.

Sign up to receive exclusive content around cloud native software development right into your inbox.

We don’t spam! Read our privacy policy for more info.

More stories from our blog

Three Monsters: The path to Self Growth

Three Monsters: The path to Self Growth

If you ever take a journey down your daily journal, you would find certain traits that set you back and harm your trajectory to success. Now, if you are busy and don’t have time to write a journal (aka no time for self-discovery) but want to discover these traits (I...

Proxy Servers: The Captivate Shield

Proxy Servers: The Captivate Shield

If you have been scrolling the web, you would have heard about the terms proxy and reverse proxy at least once. You might know a bit of them or might be completely unaware of what they are. This is completely okay with me, and if you have the desire to understand...

Service Mesh: The Gateway to Happiness

Service Mesh: The Gateway to Happiness

Microservices have lead the human race away from monolithic applications to a cloud native landscape. The dominance of microservices (containers) has impacted the modern development environment to be scalable, flexible and continuous. But as the number of...

CNCF: Forefront of the Cloud Native Landscape

CNCF: Forefront of the Cloud Native Landscape

Cloud Native Computing Foundation or CNCF is a term you would see flying all around the cloud native landscape. You might know about it a bit as a prominent organization that maintains your frequently used open source tools like Kubernetes, Prometheus (and more!)...

Kubernetes: Everything You Need to Know about it

Kubernetes: Everything You Need to Know about it

The demand around scalable and reliable services is increasing every day exponentially. The market is driven by customers demanding their favorite services to have zero downtime and companies that lose millions of dollars for every minute they’re down. If you have...

Turbo-charge with Container Orchestration

Turbo-charge with Container Orchestration

Managing containers while traffic increases or decreases in cost-effective ways round the clock sounds challenging and complex without tools. We, as cloud-native citizens, crave scalability and agility. But our containers going into production without the cloud-native...

Unikernel Vs Container Vs VMs: Here is what you should use

Unikernel Vs Container Vs VMs: Here is what you should use

If you’d gone through Containers, Unikernels and VMs, I would bet you’re confused about which one to try for your new venture. It’s normal and happens to everyone while experimenting with adopting new technology. Remember the age-old dilemma of you thinking which...

How to build a Kubernetes cluster on HETZNER with k3s

How to build a Kubernetes cluster on HETZNER with k3s

HETZNER is a german cloud provider having very competitive prices for linux-based VMs. It's a great place to run Kubernetes, as HETZNER provides many integrations with their systems we can leverage when running Kubernetes: CSI IntegrationTerraform...

Interested in what we do? Looking for help? Wanna talk about software strategy?