Runner registered successfully even when registration fails

I'm trying to add kubernetes cluster using helm. I created token from command line:

gitlab-runner register --url https://gitlab.com/ --registration-token MY_TOKEN

Copied the token to values.yaml and run helm@3 install command.

Gitlab runner gets error trying to verify the token, but says registration was successful:

Registration attempt 1 of 30
Runtime platform                                    arch=amd64 os=linux pid=15 revision=2ebc4dc4 version=13.9.0
WARNING: Running in user-mode.                     
WARNING: The user-mode requires you to manually start builds processing: 
WARNING: $ gitlab-runner run                       
WARNING: Use sudo for system-mode:                 
WARNING: $ sudo gitlab-runner...                   
                                                   
Token specified trying to verify runner...         
WARNING: If you want to register use the '-r' instead of '-t'. 

VVVV
ERROR: Verifying runner... failed                   runner=rKSHdYZd status=couldn't execute POST against https://gitlab.com/api/v4/runners/verify: Post https://gitlab.com/api/v4/runners/verify: dial tcp: i/o timeout
Merging configuration from template file "/scripts/config.template.toml" 
Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded! 
^^^^

Runtime platform                                    arch=amd64 os=linux pid=1 revision=2ebc4dc4 version=13.9.0
Starting multi-runner from /home/gitlab-runner/.gitlab-runner/config.toml...  builds=0
WARNING: Running in user-mode.                     
WARNING: Use sudo for system-mode:                 
WARNING: $ sudo gitlab-runner...                   
                                                   
Configuration loaded                                builds=0
Metrics server listening                            address=:9252 builds=0
[session_server].listen_address not defined, session endpoints disabled  builds=0
WARNING: Checking for jobs... failed                runner=rKSHdYZd status=couldn't execute POST against https://gitlab.com/api/v4/jobs/request: Post https://gitlab.com/api/v4/jobs/request: dial tcp: i/o timeout

image

❯ k describe pod gitlab-runner-gitlab-runner-7b848595c5-p9kck
Name:         gitlab-runner-gitlab-runner-7b848595c5-p9kck
Namespace:    gitlab-ci
Priority:     0
Node:         probook/192.168.1.232
Start Time:   Mon, 15 Mar 2021 08:28:01 +0000
Labels:       app=gitlab-runner-gitlab-runner
              chart=gitlab-runner-0.26.0
              heritage=Helm
              pod-template-hash=7b848595c5
              release=gitlab-runner
Annotations:  checksum/configmap: a99fa300bfc61fa95562c7b30c5120d1dc5b9eb384e1e3ff3023bde8d27a9dc0
              checksum/secrets: 192b9899b0be624960317d03099a33b9b8f5224194066f71e5d5e61e208a9128
              prometheus.io/port: 9252
              prometheus.io/scrape: true
Status:       Running
IP:           10.42.1.23
IPs:
  IP:           10.42.1.23
Controlled By:  ReplicaSet/gitlab-runner-gitlab-runner-7b848595c5
Init Containers:
  configure:
    Container ID:  containerd://de866f6049a4f63086c7e06e7489883a4c8637529b6b9d8b3d6cb597b97a2acd
    Image:         gitlab/gitlab-runner:alpine-v13.9.0
    Image ID:      docker.io/gitlab/gitlab-runner@sha256:9f578a00ed70fa15d8bbd3882566a14f3e5f9033ccadf67349949528eb0deeef
    Port:          <none>
    Host Port:     <none>
    Command:
      sh
      /config/configure
    State:          Terminated
      Reason:       Completed
      Exit Code:    0
      Started:      Mon, 15 Mar 2021 08:28:02 +0000
      Finished:     Mon, 15 Mar 2021 08:28:02 +0000
    Ready:          True
    Restart Count:  0
    Environment:
      CI_SERVER_URL:                                    https://gitlab.com/
      CLONE_URL:                                        
      RUNNER_REQUEST_CONCURRENCY:                       1
      RUNNER_EXECUTOR:                                  kubernetes
      REGISTER_LOCKED:                                  false
      RUNNER_TAG_LIST:                                  
      KUBERNETES_IMAGE:                                 
      KUBERNETES_PRIVILEGED:                            true
      KUBERNETES_NAMESPACE:                             gitlab-ci
      KUBERNETES_CPU_LIMIT:                             
      KUBERNETES_CPU_LIMIT_OVERWRITE_MAX_ALLOWED:       
      KUBERNETES_MEMORY_LIMIT:                          
      KUBERNETES_MEMORY_LIMIT_OVERWRITE_MAX_ALLOWED:    
      KUBERNETES_CPU_REQUEST:                           
      KUBERNETES_CPU_REQUEST_OVERWRITE_MAX_ALLOWED:     
      KUBERNETES_MEMORY_REQUEST:                        
      KUBERNETES_MEMORY_REQUEST_OVERWRITE_MAX_ALLOWED:  
      KUBERNETES_SERVICE_ACCOUNT:                       
      KUBERNETES_SERVICE_CPU_LIMIT:                     
      KUBERNETES_SERVICE_MEMORY_LIMIT:                  
      KUBERNETES_SERVICE_CPU_REQUEST:                   
      KUBERNETES_SERVICE_MEMORY_REQUEST:                
      KUBERNETES_HELPER_CPU_LIMIT:                      
      KUBERNETES_HELPER_MEMORY_LIMIT:                   
      KUBERNETES_HELPER_CPU_REQUEST:                    
      KUBERNETES_HELPER_MEMORY_REQUEST:                 
      KUBERNETES_HELPER_IMAGE:                          
      KUBERNETES_PULL_POLICY:                           
    Mounts:
      /config from scripts (ro)
      /init-secrets from init-runner-secrets (ro)
      /secrets from runner-secrets (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-sxpj4 (ro)
Containers:
  gitlab-runner-gitlab-runner:
    Container ID:  containerd://f51c60e01d1ff140dd523939b0db86eaebbdfd012106039a5ecd905ec14393eb
    Image:         gitlab/gitlab-runner:alpine-v13.9.0
    Image ID:      docker.io/gitlab/gitlab-runner@sha256:9f578a00ed70fa15d8bbd3882566a14f3e5f9033ccadf67349949528eb0deeef
    Port:          9252/TCP
    Host Port:     0/TCP
    Command:
      /bin/bash
      /scripts/entrypoint
    State:          Running
      Started:      Mon, 15 Mar 2021 08:28:03 +0000
    Ready:          True
    Restart Count:  0
    Liveness:       exec [/bin/bash /scripts/check-live] delay=60s timeout=1s period=10s #success=1 #failure=3
    Readiness:      exec [/usr/bin/pgrep gitlab.*runner] delay=10s timeout=1s period=10s #success=1 #failure=3
    Environment:
      CI_SERVER_URL:                                    https://gitlab.com/
      CLONE_URL:                                        
      RUNNER_REQUEST_CONCURRENCY:                       1
      RUNNER_EXECUTOR:                                  kubernetes
      REGISTER_LOCKED:                                  false
      RUNNER_TAG_LIST:                                  
      KUBERNETES_IMAGE:                                 
      KUBERNETES_PRIVILEGED:                            true
      KUBERNETES_NAMESPACE:                             gitlab-ci
      KUBERNETES_CPU_LIMIT:                             
      KUBERNETES_CPU_LIMIT_OVERWRITE_MAX_ALLOWED:       
      KUBERNETES_MEMORY_LIMIT:                          
      KUBERNETES_MEMORY_LIMIT_OVERWRITE_MAX_ALLOWED:    
      KUBERNETES_CPU_REQUEST:                           
      KUBERNETES_CPU_REQUEST_OVERWRITE_MAX_ALLOWED:     
      KUBERNETES_MEMORY_REQUEST:                        
      KUBERNETES_MEMORY_REQUEST_OVERWRITE_MAX_ALLOWED:  
      KUBERNETES_SERVICE_ACCOUNT:                       
      KUBERNETES_SERVICE_CPU_LIMIT:                     
      KUBERNETES_SERVICE_MEMORY_LIMIT:                  
      KUBERNETES_SERVICE_CPU_REQUEST:                   
      KUBERNETES_SERVICE_MEMORY_REQUEST:                
      KUBERNETES_HELPER_CPU_LIMIT:                      
      KUBERNETES_HELPER_MEMORY_LIMIT:                   
      KUBERNETES_HELPER_CPU_REQUEST:                    
      KUBERNETES_HELPER_MEMORY_REQUEST:                 
      KUBERNETES_HELPER_IMAGE:                          
      KUBERNETES_PULL_POLICY:                           
    Mounts:
      /home/gitlab-runner/.gitlab-runner from etc-gitlab-runner (rw)
      /scripts from scripts (rw)
      /secrets from runner-secrets (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-sxpj4 (ro)
Conditions:
  Type              Status
  Initialized       True 
  Ready             True 
  ContainersReady   True 
  PodScheduled      True 
Volumes:
  runner-secrets:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:     Memory
    SizeLimit:  <unset>
  etc-gitlab-runner:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:     Memory
    SizeLimit:  <unset>
  init-runner-secrets:
    Type:                Projected (a volume that contains injected data from multiple sources)
    SecretName:          gitlab-runner-gitlab-runner
    SecretOptionalName:  <nil>
  scripts:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      gitlab-runner-gitlab-runner
    Optional:  false
  default-token-sxpj4:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-sxpj4
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  kubernetes.io/arch=amd64
Tolerations:     node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                 node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type    Reason     Age   From               Message
  ----    ------     ----  ----               -------
  Normal  Scheduled  14m   default-scheduler  Successfully assigned gitlab-ci/gitlab-runner-gitlab-runner-7b848595c5-p9kck to probook
  Normal  Pulled     14m   kubelet            Container image "gitlab/gitlab-runner:alpine-v13.9.0" already present on machine
  Normal  Created    14m   kubelet            Created container configure
  Normal  Started    14m   kubelet            Started container configure
  Normal  Pulled     14m   kubelet            Container image "gitlab/gitlab-runner:alpine-v13.9.0" already present on machine
  Normal  Created    14m   kubelet            Created container gitlab-runner-gitlab-runner
  Normal  Started    14m   kubelet            Started container gitlab-runner-gitlab-runner
Edited by agilob