Help us learn about your current experience with the documentation. Take the survey.

Set up external dependencies for local development

The bundled PostgreSQL, Redis, and MinIO charts have been deprecated and were removed in GitLab 19.0. Use scripts/dev_dependencies.sh to quickly provision externally managed replacements (CloudNativePG, Valkey, and Garage) in your cluster.

For migrating an existing installation, see Migrate from the bundled Redis, PostgreSQL, and MinIO charts.

Prerequisites

  • A running local Kubernetes cluster: k3s, KinD, or minikube
  • kubectl connected to your cluster
  • helm v4 or later (required by the Garage installation, which uses the helm-git plugin with --verify support)
  • Approximately 2 CPU cores, 4 GiB of memory, and 12 GiB of persistent storage

The Garage setup adds a Helm repository named garage to your local Helm configuration. If you already have a garage repository registered with a different version, the setup fails. Remove it first, then re-run setup:

helm repo remove garage
bash scripts/dev_dependencies.sh setup

See Environment setup for tool installation guidance.

Quick start

  1. From the root of the chart repository, run:

    bash scripts/dev_dependencies.sh setup

    To use a different namespace:

    NAMESPACE=my-namespace bash scripts/dev_dependencies.sh setup
  2. Deploy the GitLab chart with the generated values file:

    helm dependency update
    helm upgrade --install gitlab . \
      --namespace gitlab \
      --timeout 600s \
      -f .values/dev-external.values.yaml \
      --set global.hosts.domain=<YOUR_DOMAIN> \
      --set global.hosts.externalIP=<YOUR_IP> \
      --set certmanager-issuer.email=<YOUR_EMAIL>

    .values/dev-external.values.yaml is generated by the setup script and is gitignored.

What the script does

  1. Valkey - deploys a standalone instance with authentication and a 2 GiB persistent volume. A random password is auto-generated and stored in a Kubernetes Secret on first run; subsequent runs reuse the existing secret.
  2. CloudNativePG - installs the operator (namespace-scoped) and creates a single-instance PostgreSQL cluster with the gitlabhq_production database.
  3. Garage - installs the object storage service, creates the GitLab buckets, and writes three Kubernetes Secrets (gitlab-object-storage, gitlab-object-storage-s3cmd, gitlab-registry-storage).
  4. Values file - writes .values/dev-external.values.yaml with connection settings for all three services.

Managing the setup

Check status:

bash scripts/dev_dependencies.sh status

Remove the external dependencies (does not affect the GitLab chart release):

bash scripts/dev_dependencies.sh teardown

Remove the GitLab chart release as well:

helm uninstall gitlab --namespace gitlab

Configuration

VariableDefaultDescription
NAMESPACEgitlabKubernetes namespace for all services
GARAGE_APP_VERSION2.2.0Garage version to install
CNPG_POSTGRESQL_TAG17PostgreSQL image tag used by CloudNativePG

Further reading