Member-only story

Removing MFA with Gitlab and K8s

Helm | AWS | K8s Cluster

βš— Kevin Summersill πŸ”‹
3 min readOct 12, 2020

This is a quick article on how to remove the Multi-Factor Authentication (aka MFA) that may be associated with your root account. So the first part of this article I will show you how to get the password to your cluster. In the next part, I will talk about how you can remove the MFA.

Step 1. Obtaining the password for the Gitlab Server. You can do this by entering the following using the Kubernetes CLI:

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

Great. However, someone else has set up an MFA on their device and you need access to the Gitlab server via Root. What can we do? Well as long as you can access the cluster via Kubernetes CLI; you are in luck. The key here is knowing which pod you need to run the β€œgitlab-rake” on. Your standard deployment using helm will look something like this:

gitlab-gitaly-0                                         1/1     Running   0          6d
gitlab-gitlab-exporter-7959dcb687-59sq4 1/1 Running 0 6d
gitlab-gitlab-shell-57cc77cbfb-bktg2 1/1 Running 0 2d21h
gitlab-gitlab-shell-57cc77cbfb-jnddd 1/1 Running 0 6d
gitlab-minio-6dd7d96ddb-kwdtw…

--

--

βš— Kevin Summersill πŸ”‹
βš— Kevin Summersill πŸ”‹

Written by βš— Kevin Summersill πŸ”‹

Enterprise Solution Architect | Certified K8s Administrator/Developer βš“ | SAFe SPC | Cert Terraform | AWS Solutions Architect | Dev*Ops/GitOps Engineer πŸ”₯

No responses yet