Skip to content

gitlab

Introduction

GitLab is a all-in-one platform to plan, build, secure, and deploy software in a DevOps based manner. It includes a full featured CI/CD toolchain.

I don't want to upload the code of some of my projects to a platform like GitHub for privacy reasons and therefore I use a self-hosted instance of GitLab for these projects. Besides, the setup and maintenance of a GitLab instance was a good exercise for me.

Created Resources

Kind Name
Namespace gitlab
HelmRelease gitlab
Certificate git.${DOMAINS_EXTERNAL}
IngressRoute dashboard

CLI

GitLab provides a CLI tool to interact with the instance. The following command can be used to access it inside the cluster:

kubectl exec -it --namespace gitlab deploy/gitlab -- gitlab-backup <task> # tasks: create | restore

For more information on the gitlab-backup command itself visit their docs.

Tip

These commands could be perfectly automated using a Kubernetes CronJob. You can see an example in my Helm chart for GitLab.