Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KUBECONFIG ignored when running in-cluster #101

Open
frezbo opened this issue Jan 21, 2022 · 0 comments
Open

KUBECONFIG ignored when running in-cluster #101

frezbo opened this issue Jan 21, 2022 · 0 comments

Comments

@frezbo
Copy link

frezbo commented Jan 21, 2022

When kubestr is run inside a k8s pod, explicitly specifying KUBECONFIG has no effect

kubectl behavior

/ # kubectl get pods
Error from server (Forbidden): pods is forbidden: User "system:serviceaccount:monito-rss:default" cannot list resource "pods" in API group "" in the namespace "monito-rss"
/ # KUBECONFIG=/tmp/k kubectl get pods
NAME                              READY   STATUS    RESTARTS   AGE
redis-0                           1/1     Running   0          4h44m

kubestr behavior

/ # kubestr 

**************************************
  _  ___   _ ___ ___ ___ _____ ___
  | |/ / | | | _ ) __/ __|_   _| _ \
  | ' <| |_| | _ \ _|\__ \ | | |   /
  |_|\_\\___/|___/___|___/ |_| |_|_\

Explore your Kubernetes storage options
**************************************
Kubernetes Version Check:
  Valid kubernetes version (v1.20.2+k3s1)  -  OK

RBAC Check:
  Kubernetes RBAC is enabled  -  OK

Aggregated Layer Check:
  The Kubernetes Aggregated Layer is enabled  -  OK

Error listing provisioners: storageclasses.storage.k8s.io is forbidden: User "system:serviceaccount:monito-rss:default" cannot list resource "storageclasses" in API group "storage.k8s.io" at the cluster scope
Error: Error listing provisioners: storageclasses.storage.k8s.io is forbidden: User "system:serviceaccount:monito-rss:default" cannot list resource "storageclasses" in API group "storage.k8s.io" at the cluster scope
/ # KUBECONFIG=/tmp/k kubestr

**************************************
  _  ___   _ ___ ___ ___ _____ ___
  | |/ / | | | _ ) __/ __|_   _| _ \
  | ' <| |_| | _ \ _|\__ \ | | |   /
  |_|\_\\___/|___/___|___/ |_| |_|_\

Explore your Kubernetes storage options
**************************************
Kubernetes Version Check:
  Valid kubernetes version (v1.20.2+k3s1)  -  OK

RBAC Check:
  Kubernetes RBAC is enabled  -  OK

Aggregated Layer Check:
  The Kubernetes Aggregated Layer is enabled  -  OK

Error listing provisioners: storageclasses.storage.k8s.io is forbidden: User "system:serviceaccount:monito-rss:default" cannot list resource "storageclasses" in API group "storage.k8s.io" at the cluster scope
Error: Error listing provisioners: storageclasses.storage.k8s.io is forbidden: User "system:serviceaccount:monito-rss:default" cannot list resource "storageclasses" in API group "storage.k8s.io" at the cluster scope
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant