Errors when using Helm to run GitLab in K8s

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

I am using the instructions here:

https://docs.gitlab.com/charts/quickstart/index.html#help-and-feedback

To test a Helm install on a VM in vSphere running microk8s.

Steps to reproduce

The commands are:

helm repo add gitlab https://charts.gitlab.io/
helm install gitlab gitlab/gitlab \
  --set global.hosts.domain=localhost.domain \
  --set certmanager-issuer.email=xx@xx

Note that I am using localhost.domain for the hosts.domain value.

Example Project

What is the current bug behavior?

kubectl get ingress -lrelease=gitlab
NAME                        CLASS    HOSTS                        ADDRESS   PORTS     AGE
gitlab-webservice-default   <none>   gitlab.cl-dev-host-00-k8               80, 443   29m
gitlab-minio                <none>   minio.cl-dev-host-00-k8                80, 443   29m
gitlab-registry             <none>   registry.cl-dev-host-00-k8             80, 443   29m

Note that there are no ADDRESS values.


kubectl get pods
NAME                                                    READY   STATUS             RESTARTS        AGE
gitlab-postgresql-0                                     0/2     Pending            0               9m46s
gitlab-minio-864888b9fb-q22s7                           0/1     Pending            0               9m47s
gitlab-redis-master-0                                   0/2     Pending            0               9m46s
gitlab-gitaly-0                                         0/1     Pending            0               9m46s
gitlab-prometheus-server-6444c7bd76-hzk4w               0/2     Pending            0               9m45s
gitlab-certmanager-7d56f6fd9b-7dkcr                     1/1     Running            0               9m47s
gitlab-minio-create-buckets-1--1-2ft2x                  1/1     Running            0               9m46s
gitlab-registry-5b9d7b775b-496s6                        1/1     Running            0               9m47s
gitlab-task-runner-59bf9946f9-bb97t                     1/1     Running            0               9m46s
gitlab-nginx-ingress-default-backend-79f8bd4776-nhpr7   1/1     Running            0               9m46s
gitlab-gitlab-exporter-8595d7d474-k4crt                 1/1     Running            0               9m46s
gitlab-certmanager-webhook-7f97f88796-8xb8l             1/1     Running            0               9m45s
gitlab-gitlab-shell-7b4d449b5f-thc9z                    1/1     Running            0               9m45s
gitlab-registry-5b9d7b775b-t4tp4                        1/1     Running            0               9m32s
gitlab-gitlab-shell-7b4d449b5f-zd2lz                    1/1     Running            0               9m32s
gitlab-gitlab-runner-5c95d6bffd-vdgq4                   0/1     Running            3 (2m5s ago)    9m45s
gitlab-certmanager-cainjector-5cd57fbbbc-svxtf          0/1     CrashLoopBackOff   6 (98s ago)     9m47s
gitlab-webservice-default-55675cdf47-sbd6j              0/2     Init:2/3           6 (3m18s ago)   9m31s
gitlab-nginx-ingress-controller-68648fcc5c-fftch        0/1     CrashLoopBackOff   6 (15s ago)     9m47s
gitlab-sidekiq-all-in-1-v1-896f6967b-nwgkc              0/1     Init:Error         6               9m47s
gitlab-webservice-default-55675cdf47-t4k6x              0/2     Init:Error         6 (3m29s ago)   9m45s
gitlab-nginx-ingress-controller-68648fcc5c-nd4gn        0/1     Running            7 (5s ago)      9m47s

Note containers in CrashLoopBackOff and Init:Error.

What is the expected correct behavior?

That the GitLab containers startup properly.

Relevant logs and/or screenshots

$ k logs gitlab-nginx-ingress-controller-68648fcc5c-nd4gn        
-------------------------------------------------------------------------------
NGINX Ingress controller
  Release:       v0.41.2
  Build:         d8a93551e6e5798fc4af3eb910cef62ecddc8938
  Repository:    https://github.com/kubernetes/ingress-nginx
  nginx version: nginx/1.19.4

-------------------------------------------------------------------------------

I1117 12:45:14.172573       8 flags.go:205] "Watching for Ingress" class="gitlab-nginx"
W1117 12:45:14.172626       8 flags.go:208] Only Ingresses with class "gitlab-nginx" will be processed by this Ingress controller
W1117 12:45:14.172956       8 client_config.go:608] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
I1117 12:45:14.173165       8 main.go:241] "Creating API client" host="https://10.152.183.1:443"
I1117 12:45:14.184496       8 main.go:285] "Running in Kubernetes cluster" major="1" minor="22+" git="v1.22.3-3+9ec7c40ec93c73" state="clean" commit="9ec7c40ec93c73c2281bdd2e4a75baf6247366a0" platform="linux/amd64"
I1117 12:45:14.188782       8 main.go:87] "Valid default backend" service="default/gitlab-nginx-ingress-default-backend"
I1117 12:45:14.284413       8 main.go:105] "SSL fake certificate created" file="/etc/ingress-controller/ssl/default-fake-certificate.pem"
I1117 12:45:14.285223       8 main.go:115] "Enabling new Ingress features available since Kubernetes v1.18"
W1117 12:45:14.287176       8 main.go:127] No IngressClass resource with name gitlab-nginx found. Only annotation will be used.
I1117 12:45:14.320621       8 nginx.go:249] "Starting NGINX Ingress controller"
I1117 12:45:14.328470       8 event.go:282] Event(v1.ObjectReference{Kind:"ConfigMap", Namespace:"default", Name:"gitlab-nginx-ingress-controller", UID:"24daf3cc-aa96-4301-a06d-713bdf098429", APIVersion:"v1", ResourceVersion:"7882", FieldPath:""}): type: 'Normal' reason: 'CREATE' ConfigMap default/gitlab-nginx-ingress-controller
I1117 12:45:14.332252       8 event.go:282] Event(v1.ObjectReference{Kind:"ConfigMap", Namespace:"default", Name:"gitlab-nginx-ingress-tcp", UID:"00ddfef5-5232-497a-adc6-57eb44948f65", APIVersion:"v1", ResourceVersion:"7901", FieldPath:""}): type: 'Normal' reason: 'CREATE' ConfigMap default/gitlab-nginx-ingress-tcp
E1117 12:45:15.424296       8 reflector.go:127] k8s.io/client-go@v0.19.3/tools/cache/reflector.go:156: Failed to watch *v1beta1.Ingress: failed to list *v1beta1.Ingress: the server could not find the requested resource
E1117 12:45:16.917817       8 reflector.go:127] k8s.io/client-go@v0.19.3/tools/cache/reflector.go:156: Failed to watch *v1beta1.Ingress: failed to list *v1beta1.Ingress: the server could not find the requested resource
E1117 12:45:18.817634       8 reflector.go:127] k8s.io/client-go@v0.19.3/tools/cache/reflector.go:156: Failed to watch *v1beta1.Ingress: failed to list *v1beta1.Ingress: the server could not find the requested resource
E1117 12:45:23.654637       8 reflector.go:127] k8s.io/client-go@v0.19.3/tools/cache/reflector.go:156: Failed to watch *v1beta1.Ingress: failed to list *v1beta1.Ingress: the server could not find the requested resource
E1117 12:45:30.976032       8 reflector.go:127] k8s.io/client-go@v0.19.3/tools/cache/reflector.go:156: Failed to watch *v1beta1.Ingress: failed to list *v1beta1.Ingress: the server could not find the requested resource
E1117 12:45:53.176621       8 reflector.go:127] k8s.io/client-go@v0.19.3/tools/cache/reflector.go:156: Failed to watch *v1beta1.Ingress: failed to list *v1beta1.Ingress: the server could not find the requested resource
I1117 12:46:12.784895       8 main.go:187] "Received SIGTERM, shutting down"
I1117 12:46:12.784925       8 nginx.go:365] "Shutting down controller queues"
E1117 12:46:12.785038       8 store.go:178] timed out waiting for caches to sync
I1117 12:46:12.785139       8 nginx.go:291] "Starting NGINX process"
I1117 12:46:12.785419       8 leaderelection.go:243] attempting to acquire leader lease  default/ingress-controller-leader-gitlab-nginx...
I1117 12:46:12.785774       8 queue.go:78] "queue has been shutdown, failed to enqueue" key="&ObjectMeta{Name:initial-sync,GenerateName:,Namespace:,SelfLink:,UID:,ResourceVersion:,Generation:0,CreationTimestamp:0001-01-01 00:00:00 +0000 UTC,DeletionTimestamp:<nil>,DeletionGracePeriodSeconds:nil,Labels:map[string]string{},Annotations:map[string]string{},OwnerReferences:[]OwnerReference{},Finalizers:[],ClusterName:,ManagedFields:[]ManagedFieldsEntry{},}"
I1117 12:46:12.793194       8 status.go:84] "New leader elected" identity="gitlab-nginx-ingress-controller-68648fcc5c-9w924"
I1117 12:46:12.812405       8 nginx.go:381] "Stopping NGINX process"
2021/11/17 12:46:12 [notice] 43#43: signal process started
I1117 12:46:13.819093       8 nginx.go:394] "NGINX process has stopped"
I1117 12:46:13.819139       8 main.go:195] "Handled quit, awaiting Pod deletion"
I1117 12:46:23.819387       8 main.go:198] "Exiting" code=0

Output of checks

Results of GitLab environment info

Results of GitLab application Check

Possible fixes

Edited by 🤖 GitLab Bot 🤖