0

I am trying to create a CI Pipeline for my GitLab project to deploy my microservices automatically on a Google Kubernetes Engine cluster.

Sadly I am unable to use the build-In native Google Cloud Integration from GitLab as it isn't properly configured, so I have to do it the manual way. I am following this guide to link my cluster to gitlab, but after setting everything up, installing Helm Tiller fails with a Kubernetes 401 error.

I suspect, that it fails because I didn't give the container.clusterRoleBindings.create role to my service account, however I created it using the commands given in the guide and as I can't see this account in the Google IAM service accounts list, I have no Idea how to give it to my Kubernetes service account.

Does anyone have an idea how I can give my service account that permission or what I have to do different in order to get the gitlab gke integration up and running?

Jonas H
  • 1
  • 1
  • 1
    Can you list all service accounts `kubectl get sa --all-namespaces` ? – A_Suh Jun 24 '19 at 10:42
  • There was a similar case on Stackoverflow and eventually cluster re-creation solved the problem. Can you try it out? [1]: https://stackoverflow.com/questions/56732383/there-was-a-problem-authenticationg-with-your-cluster-when-i-making-gitlab-and?noredirect=1#comment100049616_56732383 – A_Suh Jun 25 '19 at 08:16

1 Answers1

0

Please check similar cases on the Stackoverflow and on the GitLab

You can not use same Kubernetes cluster integration configuration in multiple projects, otherwise it will fail to authenticate

Workaround for this is to

  1. re-create a cluster
  2. use CI Variables (KUBE_NAMESPACE and KUBECONFIG) instead of using Kubernetes integration config.
A_Suh
  • 324
  • 1
  • 7