Giter VIP home page Giter VIP logo

Comments (4)

stepanstipl avatar stepanstipl commented on July 25, 2024

Thanks for reporting this 👍, I agree. Always assumed it's supported by default in the K8s go client, but seems like it is not.

from kube-no-trouble.

stepanstipl avatar stepanstipl commented on July 25, 2024

Support to KUBECONFIG env variable has been merged in #86. 🎉 There will be a new release hopefully soon in Jan, but if anyone wants to give it a go till then, it should be available in next nightly build which gets published in GH Releases.

from kube-no-trouble.

johnlane avatar johnlane commented on July 25, 2024

I have a KUBECONFIG with several separate files in it.

The version I first installed was 0.2.0. I used this workaround successfully

kubent -k <(kubectl config view --flatten)

I then updated to 0.3.2 (the latest, I think, from 22 Sep 2020) but the above no longer works. It just gives

$ kubent -k <(kubectl config view --flatten)
INF >>> Kube No Trouble `kubent` <<<
INF version 0.3.2 (git sha 919129b596890475965cda2b972cb6fded71f40b)
INF Initializing collectors and retrieving data
ERR Failed to initialize collector: <nil> error="invalid configuration: no configuration has been provided"
ERR Failed to initialize collector: <nil> error="invalid configuration: no configuration has been provided"
INF Retrieved 13 resources from collector name=Cluster
INF Loaded ruleset name=deprecated-1-16.rego
INF Loaded ruleset name=deprecated-1-22.rego

Strangely, the below does produce output but it isn't the same as what 0.2.0 gives me.

kubectl config view --flatten > kubeconfig && kubent -k kubeconfig

Examples of differences - first, with 0.2.0

INF Retrieved 111 resources from collector name=Cluster
INF Retrieved 138 resources from collector name="Helm v3"
>>> 1.20 Deprecated APIs <<<
------------------------------------------------------------------------------------------
KIND      NAMESPACE   NAME                     API_VERSION
Ingress   myns         mying                   extensions/v1beta1

And with 0.3.2

INF Retrieved 13 resources from collector name=Cluster
INF Retrieved 0 resources from collector name="Helm v2"
INF Retrieved 138 resources from collector name="Helm v3"
>>> Deprecated APIs removed in 1.22 <<<
------------------------------------------------------------------------------------------
KIND      NAMESPACE     NAME                     API_VERSION
Ingress   <undefined>   mying                   extensions/v1beta1

Hopeful for the KUBECONFIG support in the next planned release.

from kube-no-trouble.

stepanstipl avatar stepanstipl commented on July 25, 2024

Hi @johnlane, new 0.4.0 release just went out, which includes support of KUBECONFIG env variable. I wouldn't worry too much about different output compared to 0.2.0, there have been quite a few fixes and changes to sort out duplicate/false-positive findings and missing namespace in case of helm collector. Please give it a go with the latest 0.4.0 and if you still see something that doesn't look right let us know. Thanks 👍

from kube-no-trouble.

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.