Tim Van Wassenhove

Passionate geek, interested in Technology. Proud father of two

05 Jan 2021

cluster-info on k8s cluster with limited permissions

When you have limited access (eg: only a specific namespace (~ openshift project) on a kubernetes cluster you may not be able to run kubectl cluster-info.

➜  ~ kubectl cluster-info

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
Error from server (Forbidden): services is forbidden: User "timvw" cannot list resource "services" in API group "" in the namespace "kube-system"

As soon as you run the command in your namespace it will work:

➜  ~ kubectl cluster-info -n spark
Kubernetes master is running at https://api.customer.example:443

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.