RBAC roles required to solve cannot get path "/" for a user

5/24/2019

I have a kubernetes user(below is the kubeconfig).

users:
- name: alok.singh@practo.com
  user:
    auth-provider:
      config:
        client-id: XXX
        client-secret: XXX
        id-token: XXX
        refresh-token: 

When making GET request to the kubernetes API, I am getting the below error.

GET request - https://sourcegraph.com/github.com/vapor-ware/ksync/-/blob/pkg/ksync/doctor/kubernetes.go#L78

err= forbidden: User "alok.singh@practo.com" cannot get path "/"

What is the exact role i need to create to give access to the path "/"

-- Alok Kumar Singh
kubernetes

1 Answer

5/24/2019

Only a cluster admin can access "/"

Here is the role for it.

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: cluster-admin
rules:
- apiGroups:
  - '*'
  resources:
  - '*'
  verbs:
  - '*'
- nonResourceURLs:
  - '*'
  verbs:
  - '*
-- Alok Kumar Singh
Source: StackOverflow