Something went wrong while installing Helm Tiller Kubernetes error: 403

Summary

Made a new GCP Kubernetes cluster and tried to install the Helm tiller via gitlab in the kubernetes cluster. But got the error:

Something went wrong while installing Helm Tiller
  Kubernetes error: 403

Steps to reproduce

  1. Create GCP EKS cluster with the default settings.
  2. Add Kubernetes cluster to gitlab project (Tried with both RBAC enabled and RBAC disabled, same error.)
  3. Click on the 'Install Helm' button under the Operations->Kubernetes tab.

What is the current bug behavior?

Helm tiller fails to install

What is the expected correct behavior?

Helm tiller installs correctly.

Relevant logs and/or screenshots

helm_tiller_403

kubernetes.log

{"severity":"INFO","time":"2019-09-19T09:31:26.495Z","correlation_id":"sqOQPq6aDT8","service":"Clusters::Applications::InstallService","app_id":11,"app_name":"helm","project_ids":[],"group_ids":[],"event":"begin_install"}
{"severity":"ERROR","time":"2019-09-19T09:31:27.333Z","correlation_id":"sqOQPq6aDT8","exception":"Kubeclient::HttpError","status_code":403,"namespace":"gitlab-managed-apps","class_name":"Gitlab::Kubernetes::Namespace","event":"failed_to_create_namespace","message":"namespaces \"gitlab-managed-apps\" is forbidden: User \"system:serviceaccount:default:default\" cannot get resource \"namespaces\" in API group \"\" in the namespace \"gitlab-managed-apps\""}
{"severity":"ERROR","time":"2019-09-19T09:31:27.338Z","correlation_id":"sqOQPq6aDT8","error_code":403,"service":"Clusters::Applications::InstallService","app_id":11,"app_name":"helm","project_ids":[],"group_ids":[],"exception":"Kubeclient::HttpError","message":"namespaces \"gitlab-managed-apps\" is forbidden: User \"system:serviceaccount:default:default\" cannot get resource \"namespaces\" in API group \"\" in the namespace \"gitlab-managed-apps\"","backtrace":["lib/gitlab/kubernetes/kube_client.rb:34:in `get_namespace'","lib/gitlab/kubernetes/namespace.rb:14:in `exists?'","lib/gitlab/kubernetes/namespace.rb:27:in `ensure_exists!'","lib/gitlab/kubernetes/helm/api.rb:13:in `install'","app/services/clusters/applications/install_service.rb:18:in `install'","app/services/clusters/applications/install_service.rb:11:in `execute'","app/workers/cluster_install_app_worker.rb:10:in `block in perform'","app/workers/concerns/cluster_applications.rb:8:in `find_application'","app/workers/cluster_install_app_worker.rb:9:in `perform'"]}

Output of checks

This bug happens on my own install of gitlab-ee

Results of GitLab environment info

Expand for output related to GitLab environment info

System information System: Ubuntu 18.04 Proxy: no Current User: git Using RVM: no Ruby Version: 2.6.3p62 Gem Version: 2.7.9 Bundler Version:1.17.3 Rake Version: 12.3.2 Redis Version: 3.2.12 Git Version: 2.22.0 Sidekiq Version:5.2.7 Go Version: unknown

GitLab information Version: 12.2.1-ee Revision: e4a8b6c773a Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 10.9 URL: https://rhassanein.do.gitlap.com HTTP Clone URL: https://rhassanein.do.gitlap.com/some-group/some-project.git SSH Clone URL: git@rhassanein.do.gitlap.com:some-group/some-project.git Elasticsearch: yes Geo: no Using LDAP: no Using Omniauth: yes Omniauth Providers:

GitLab Shell Version: 9.3.0 Repository storage paths:

  • default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git

Results of GitLab application Check

Expand for output related to the GitLab application check

Checking GitLab subtasks ...

Checking GitLab Shell ...

GitLab Shell: ... GitLab Shell version >= 9.3.0 ? ... OK (9.3.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK

Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Gitaly ...

Gitaly: ... default ... OK

Checking Gitaly ... Finished

Checking Sidekiq ...

Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Checking Incoming Email ...

Incoming Email: ... Reply by email is disabled in config/gitlab.yml

Checking Incoming Email ... Finished

Checking LDAP ...

LDAP: ... LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab App ...

Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 1/1 ... yes 7/2 ... yes 7/3 ... yes 7/4 ... yes 7/5 ... yes 7/6 ... yes 7/7 ... yes 7/8 ... yes 7/9 ... yes 7/10 ... yes 8/11 ... yes 8/12 ... yes 8/13 ... yes 8/14 ... yes 1/15 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.3) Git version >= 2.22.0 ? ... yes (2.22.0) Git user has default SSH configuration? ... yes Active users: ... 6 Elasticsearch version 5.6 - 6.x? ... Exception: Connection refused - Connection refused - connect(2) for "127.0.0.1" port 9200 (localhost:9200)

Checking GitLab App ... Finished

Checking GitLab subtasks ... Finished

Possible fixes

Manually enabling legacy authorization in GCP Kubernetes cluster.

Assignee Loading
Time tracking Loading