kube apiserver timeout Error cleaning up secrets resource name may not be empty

8/2/2021

When I trigger publish on gitlab, it fails and I check the logs of gitlab-runner pod, It shows the error below:

kubectl logs -n gitlab-tur prod-gitlab-ci-runner-0
ERROR: Job failed (system failure): Post https://10.96.0.1:443/api/v1/namespaces/gitlab-tur/secrets: dial tcp 10.96.0.1:443: i/o timeout  duration=1m0.007641837s job=3044 project=25 runner=DwvfWx49
ERROR: Error cleaning up secrets: resource name may not be empty  job=3044 project=25 runner=DwvfWx49

Here is the screenshot enter image description here

Version Info:

root@ubuntu:~# kubectl version
Client Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.4", GitCommit:"8d8aa39598534325ad77120c120a22b3a990b5ea", GitTreeState:"clean", BuildDate:"2020-03-12T21:03:42Z", GoVersion:"go1.13.8", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.4", GitCommit:"8d8aa39598534325ad77120c120a22b3a990b5ea", GitTreeState:"clean", BuildDate:"2020-03-12T20:55:23Z", GoVersion:"go1.13.8", Compiler:"gc", Platform:"linux/amd64"}

I am not able to publish anything to environments for days. Has anyone experienced such a problem before?

-- Project Mayhem
cicd
docker
gitlab
kubernetes
linux

1 Answer

8/3/2021

Looks like there is a workaround for that by deleting the gitlab-runner pod in k8s and retrying the process as per this post.

-- Jakub Siemaszko
Source: StackOverflow