gitlabkubernetes-helm

initial root password doesn't work for gitlab


I try to do a gitlab cluster with the official gitlab's helm repository for a school project.

I use the official documentation to create my gitlab cluster. https://docs.gitlab.com/charts/installation/deployment.html
Here are my CLI commands I do to reproduce my problem:

sudo k3d cluster create gitlab
sudo kubectl create namespace gitlab
sudo helm repo add gitlab https://charts.gitlab.io/
sudo helm repo update
sudo helm upgrade --install gitlab gitlab/gitlab --timeout 600s --set global.hosts.domain=example.com --set global.hosts.externalIP=10.10.10.10 --set certmanager-issuer.email=me@example.com -n gitlab

When all is deployed:

With k9s (k9s is a terminal tool to easily manage the cluster) I port forward the service "gitlab-webservice-default".

Following the official documentation I write this to recover the initial root password :
sudo kubectl get secret gitlab-gitlab-initial-root-password -n gitlab -ojsonpath='{.data.password}' | base64 --decode ; echo

On the website localhost:8181 (working thanks of the port forwarding)
I enter as username : root
as password : the password I recovered previously

Then I got a 422 error page : "422: The change you requested was rejected Make sure you have access to the thing you tried to change.

Please contact your GitLab administrator if you think this is a mistake."

I don't know what I did wrong, any help would be appreciated :)


Solution

  • My guess is that port-forwarding the webservice allows me to connect to gitlab without using TLS, and gitlab may refuse my connection for this reason.

    I retried to install gitlab with this updated values in the helm chart:

    global:
      hosts:
        domain: localhost
        https: false
      ingress:
        configureCertmanager: false
        class: nginx
    certmanager:
      install: false
    gitlab-runner:
      install: false
    

    Then it worked.
    As I am studying, this configuration is ok for me.