-
Notifications
You must be signed in to change notification settings - Fork 824
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
Failed to load kubernetes config: invalid configuration: no configuration has been provided #35
Comments
@sundowndev I'm not sure what you are missing, is it possible you do not have a running Kubernetes cluster? We use the client-go package for loading the Kubernetes config. Please update if you managed to solve your issue |
@dwertent Not sure what I should specify in
No, I can manage my cluster with kubectl. I think a better documentation about requirements and configuration would help me |
@sundowndev , if you don't mind, can you please share how your Kubernetes cluster is hosted? (minikube, EKS, GKE or etc.) I am asking because for GKE support we needed to include an additional go module |
@BenHirschbergCa It's hosted on Digitalocean |
I have the same error, but I'm using plain YAML generated via Kustomize, eg. cat output.dev.yaml | kubescape scan framework nsa -
cat output.test.yaml | kubescape scan framework nsa - |
@hermanbanken I think the issue in your case is that Kubescape loads the k8s config when the input is a file, loading the config is unnecessary since the input is a file and not a running cluster. We will fix this next release :) |
Cool! I was looking at the policyhandler package and couldn't figure out why it wasn't loading instead of getting the resources Turned out it was aborting way before 😄 |
@hermanbanken I fixed the issue, please confirm it works :) |
@sundowndev try setting |
yep that's it, I confused KUBE_CONFIG_PATH and KUBECONFIG, thanks |
Verified it works, thanks! |
I'm stuck with this error
Failed to load kubernetes config: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable
. Setting the env varKUBERNETES_MASTER
orKUBE_CONFIG_PATH
does not change anything, what am I missing ?The text was updated successfully, but these errors were encountered: