Giter VIP home page Giter VIP logo

Comments (2)

nevalla avatar nevalla commented on May 17, 2024

So this issue occurs when you open pod shell from pod details? For terminal sessions lens app will use temporary kubeconfig generated for the active cluster, so there should be only one context to use.

What is the exact error message that you will see? Also, please could you specify your OS (MacOS, Linux, Window) and Kubernetes version.

from lens.

dddicillo avatar dddicillo commented on May 17, 2024

I see. The temporary kubeconfig doesn't seem to be loaded properly in my case. I use a prompt that displays the active context and namespace, and I can still see that my terminal session is targeting a different context than what I attempt to connect to via Lens. I've actually determined that the issue is resolved by removing my KUBECONFIG export from ~/.zshenv. That said, here is my information regarding the issue:

Here is the shell output (names altered). As you can see, my shell prompt displays the active context and namespace above command output. The pod I am trying to is running on a separate context. As mentioned above, unsetting my KUBECONFIG variable resolves the issue

kubectl exec -i -t -n mynamespace mypod-78c5b4fd9-zbkhj -c mycontainer -- sh -c "((clear && bash) || (clear && ash) || (clear && sh))"

~ (active-context/active-namespace)
❯ kubectl exec -i -t -n mynamespace mypod-78c5b4fd9-zbkhj -c mycontainer -- sh -c "((clear && bash) || (clear && ash) || (clear && sh))"
Error from server (NotFound): pods "mypod-78c5b4fd9-zbkhj" not found
System Version: macOS 10.14.3 (18D109)
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.1", GitCommit:"d647ddbd755faf07169599a625faf302ffc34458", GitTreeState:"clean", BuildDate:"2019-10-02T23:49:20Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: varies by context

from lens.

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.