Code Monkey home page Code Monkey logo

Comments (11)

hermanbanken avatar hermanbanken commented on May 19, 2024 1

@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
https://github.com/armosec/kubescape/blob/571a15bee8de5a75beaee1aad091fcde2d7c25ca/policyhandler/handlenotification.go#L79-L84

Turned out it was aborting way before 😄

from kubescape.

dwertent avatar dwertent commented on May 19, 2024

@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

from kubescape.

sundowndev avatar sundowndev commented on May 19, 2024

@dwertent Not sure what I should specify in KUBERNETES_MASTER for it to work, I tried my kubeconfig path, my cluster's URL...

is it possible you do not have a running Kubernetes cluster?

No, I can manage my cluster with kubectl.

I think a better documentation about requirements and configuration would help me

from kubescape.

slashben avatar slashben commented on May 19, 2024

@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

from kubescape.

sundowndev avatar sundowndev commented on May 19, 2024

@BenHirschbergCa It's hosted on Digitalocean

from kubescape.

hermanbanken avatar hermanbanken commented on May 19, 2024

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 -

from kubescape.

dwertent avatar dwertent commented on May 19, 2024

@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 :)

from kubescape.

dwertent avatar dwertent commented on May 19, 2024

@hermanbanken I fixed the issue, please confirm it works :)

from kubescape.

dwertent avatar dwertent commented on May 19, 2024

@sundowndev try setting export KUBECONFIG=<path to config>, is it better?

from kubescape.

sundowndev avatar sundowndev commented on May 19, 2024

@sundowndev try setting export KUBECONFIG=<path to config>, is it better?

yep that's it, I confused KUBE_CONFIG_PATH and KUBECONFIG, thanks

from kubescape.

hermanbanken avatar hermanbanken commented on May 19, 2024

Verified it works, thanks!

from kubescape.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.