Skip to content

Connecting to a Cell's Toolbox Pod

This guide covers how to connect to a cell’s toolbox pod for debugging and troubleshooting purposes.

Follow the breakglass access guide to request the appropriate level of access.

Once you have the right level of access, you should get the Kubernetes cluster credentials using the appropriate procedure depending on the /cloud_provider field in the tenant model of the Cell:

  1. Kubernetes cluster access procedure for AWS
  2. Kubernetes cluster access procedure for GCP

List the toolbox pods in the default namespace:

Terminal window
$ kubectl get pod --namespace default --selector app=toolbox

Example output:

NAME READY STATUS RESTARTS AGE
gitlab-toolbox-8c6bff946-8lt4v 1/1 Running 0 5d

Execute a bash shell in the toolbox container:

Terminal window
kubectl exec -it <toolbox-pod-name> --container toolbox -- bash

Example:

Terminal window
kubectl exec -it gitlab-toolbox-8c6bff946-8lt4v --container toolbox -- bash

You should now have a shell inside the toolbox pod:

git@gitlab-toolbox-8c6bff946-8lt4v:/$

View the status of all database migrations:

Terminal window
gitlab-rails db:migrate:status

Filter for specific migrations:

Terminal window
gitlab-rails db:migrate:status | grep -E '<migration_version>'

Use the db-migrate script to execute migrations in the correct order (regular migrations first, then post-deployment migrations):

Terminal window
./scripts/db-migrate

This script will:

  • Check if migrations are up-to-date
  • Run regular migrations (db:migrate)
  • Run post-deployment migrations
  • Perform custom instance setup

If no toolbox pods are found, check:

  1. You’re in the correct namespace (default is default)
  2. The toolbox deployment exists: kubectl get deployments -l app=toolbox
  3. Check for any deployment issues: kubectl describe deployment <toolbox-deployment>