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

by | 12.04.2021 | 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

CommunityNew

The DevOps Awareness Program

Subscribe to the newsletter

Join 100+ cloud native ethusiasts

#wearep3r

Join the community Slack

Discuss all things Kubernetes, DevOps and Cloud Native

Related articles6

Startup speed, enterprise quality

Startup speed, enterprise quality

Liebe Kunden, Partner und Kollegen,2021 ist vorbei und uns alle erwarten neue Herausforderungen und Ziele in 2022.In den letzten 3 Jahren hat sich p3r von einer One-Man-Show zu einer festen Größe im deutschen Cloud-Sektor entwickelt. Mit inzwischen 11...

Introduction to GitOps

Introduction to GitOps

GitOps serves to make the process of development and operations more developer-centric. It applies DevOps practices with Git as a single source of truth for infrastructure automation and deployment, hence the name “Git Ops.” But before getting deeper into what is...

Kaniko: How Users Can Make The Best Use of Docker

Kaniko: How Users Can Make The Best Use of Docker

Whether you love or hate containers, there are only a handful of ways to work with them properly that ensures proper application use with Docker. While there do exist a handful of solutions on the web and on the cloud to deal with all the needs that come with running...

Cilium: A Beginner’s Guide To Improve Security

Cilium: A Beginner’s Guide To Improve Security

A continuation from the previous series on eBPF and security concerns; it cannot be reiterated enough number of times how important it is for developers to ensure the safety and security of their applications. With the ever expanding reach of cloud and software...

How to clean up disk space occupied by Docker images?

How to clean up disk space occupied by Docker images?

Docker has revolutionised containers even if they weren't the first to walk the path of containerisation. The ease and agility docker provide makes it the preferred engine to explore for any beginner or enterprise looking towards containers. The one problem most of...

Parsing Packages with Porter

Parsing Packages with Porter

Porter works as a containerized tool that helps users to package the elements of any existing application or codebase along with client tools, configuration resources and deployment logic in a single bundle. This bundle can be further moved, exported, shared and distributed with just simple commands.