Deploying on kubernetes fails while using Gitlab runner

9/16/2019

I'm trying to deploy my project on kubernetes using gitlab runner but I keep getting the following error:

but when I check the logs using $ kubectl logs -f runner-gitlab I get the following infos:

WARNING: Job failed: command terminated with exit code 1 duration=51.567457707s job=296652672 project=14223129 runner=NzxLg7uo ERROR: Failed to process runner builds=0 error=command terminated with exit code 1 executor=kubernetes runner=NzxLg7uo

Anyone faced this before?

-- Firas Chbiki
gitlab-ci-runner
kubernetes

1 Answer

9/20/2019

As @Firas Chbiki mentioned in the comments the issue has been solved by applying ClusterRoleBinding Kubernetes RBAC assignment , granting the permissions, enclosed in cluster-admin ClusterRole, to the particular gitlab-managed-apps:default service account, as described here.

This solution confirmed by the community members in #56557 and #61116 threads. Thanks @Andy Shinn, @Matthew L Daniel, @Yasen for their efforts and collaboration.

-- mk_sta
Source: StackOverflow