Skip to content

Instantly share code, notes, and snippets.

@nirbhabbarat
Last active April 13, 2024 07:15
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 8 You must be signed in to fork a gist
  • Save nirbhabbarat/8fe32ccaaacc782272c9f49a753e97b4 to your computer and use it in GitHub Desktop.
Save nirbhabbarat/8fe32ccaaacc782272c9f49a753e97b4 to your computer and use it in GitHub Desktop.
setup gitlab on minikube using helm3

Setup gitlab on minikube using helm3

Start minikube with virtualbox driver

minikube start \
  --driver=virtualbox \
  --cpus 4 \
  --memory 8192

Recomended: 8 CPU and 30 GB RAM (for demo we are going to use minimal setup) Note: Other drivers are listed here https://minikube.sigs.k8s.io/docs/drivers/ Some times your pods will not be able start due to permission issue when using other drivers.

Enable few minikube addons

minikube addons enable ingress
minikube addons enable dashboard

Read more: https://minikube.sigs.k8s.io/docs/commands/addons/

Add Gitlab Helm Chart

helm repo add gitlab https://charts.gitlab.io/
helm repo update

Install GitLab in minikube

helm upgrade --install gitlab gitlab/gitlab \
   --timeout 600s   \
   --set global.hosts.domain=$(minikube ip).nip.io \
   --set global.hosts.externalIP=$(minikube ip) \
   -f https://gitlab.com/gitlab-org/charts/gitlab/raw/master/examples/values-minikube-minimum.yaml

Watch pods

kubectl get pods -w

note: till all the pods are not up and running, you won't be able to access the private gitlab. Sometimes it takes 15-20 mins and you might see some failures as well, its ok wait for some time.

Get minikube ip

minikube ip

and open something like below in a browser

https://gitlab.192.168.99.100.nip.io/
git clone https://gitlab.192.168.99.100.nip.io/root/helm-demo.git

Get the password

kubectl get secret gitlab-gitlab-initial-root-password -ojsonpath='{.data.password}' | base64 --decode ; echo

Source: https://docs.gitlab.com/charts/development/minikube/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment