containers / podman-desktop

Podman Desktop - A graphical tool for developing on containers and Kubernetes
https://podman-desktop.io
Apache License 2.0
4.38k stars 280 forks source link

Allows to show Pods in different namespaces than the current namespaces of kubecontext #2262

Open odockal opened 1 year ago

odockal commented 1 year ago

Bug description

I got no pod visible, when I create one when choosing other namespace that I created using kubectl on kind cluster. Screenshot_20230427_181352

Operating system

Fedora 37

Version

next (development version)

Steps to reproduce

  1. Have started kubernetes cluster on podman desktop using kind
  2. Download kubectl
  3. Create custom namespace: kubectl create namespace guestbook
  4. Pull an image ie. docker.io/redis:6.0.5
  5. Start a container from the image
  6. In running container (redis) Deploy to Kubernetes -> Choose guestbook namespace
  7. Verify that pod was successfully created (message says running), kubectl get pods -A show redis pod available and running
  8. Open Pods nav bar.
  9. Assert: Pod is there Actual result: There is not pod under Pods in UI, although pod actually exists.

Relevant log output

No response

Additional context

No response

benoitf commented 1 year ago

please report the console.log errors ( view toggle developer tools) when you report such issue

odockal commented 1 year ago

There is no error in console.

jeffmaury commented 1 year ago

This is a known limitation: the displayed pods are from the current namespace only

odockal commented 1 year ago

@jeffmaury I see, so this should be better a enhancement request, right? Or is this something that for example openshift extension could provide?

jeffmaury commented 1 year ago

@jeffmaury I see, so this should be better a enhancement request, right? Or is this something that for example openshift extension could provide?

Enhancement

github-actions[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had activity in the last 6 months. It will be closed in 30 days if no further activity occurs. Please feel free to leave a comment if you believe the issue is still relevant. Thank you for your contributions!

victornoel commented 3 months ago

Hey people, I see this is marked as stall but honestly this is pretty limiting, especially for people trying to connect to k8s clusters from a generated kubeconfig by tooling (e.g., aws, gcp, etc). I am for example working with clusters with dozen of namespaces and modifying the kube config manually to switch between namespace is a pain (and also I suspect this requires restarting podman desktop) and will then be reverted by tools.

deboer-tim commented 3 months ago

This was marked stale since nobody had commented on it for a while, but your comment kept it open. Thanks for the feedback, at some point we would like to deliver more here and the comment helps.

Note that if the contexts are defined you can switch via the statusbar or Settings > Kubernetes today, no restart. Sounds like you'd prefer being able to select multiple, or just 'all' though.

victornoel commented 3 months ago

Thanks for your answer! Glad to see it is on the roadmap.

Note that if the contexts are defined you can switch via the statusbar or Settings > Kubernetes today, no restart.

So if I understand correctly, you propose that I create one context per namespace instead of one context per cluster, right? I didn't think of that it's a good workaround for now but it's still pretty limiting (see below).

Sounds like you'd prefer being able to select multiple, or just 'all' though.

What I need is twofold

I don't particularly need to see ALL namespaces (I have tens (i.e., 60-100, not 5-10 :) of namespaces in my clusters) but I need to be able to easily switch between existing namespaces basically.

feloy commented 3 months ago

I'm advoating in this discussion (https://github.com/containers/podman-desktop/issues/5049) to have a context per namespace, and a way to duplicate a context in a couple of clicks, to change only the namespace on it.

But for people like @victornoel having tens of clusters, it can be very annoying.

Another possibility would be to give the user the possibility to change the namespace in the current context (what kubectl ns does). Technically, for example, a dropdown with the list of existing namespaces in the current context, near the context dropdown, would give this possibility.

@victornoel what do you think?

victornoel commented 3 months ago

Another possibility would be to give the user the possibility to change the namespace in the current context (what kubectl ns does). Technically, for example, a dropdown with the list of existing namespaces in the current context, near the context dropdown, would give this possibility.

This would be totally acceptable to me yes, even if it modifies the kubeconfig (if I understand correctly your proposition), I suspect it could still be ok.

To give a bit of context, I am used to tools like k9s or lens where you can easily change the namespace from within the app without touching the context once it is setup.

mortega89 commented 3 months ago

But for people like @victornoel having tens of clusters, it can be very annoying.

Another possibility would be to give the user the possibility to change the namespace in the current context (what kubectl ns does). Technically, for example, a dropdown with the list of existing namespaces in the current context, near the context dropdown, would give this possibility.

This will solve enough manually file operations, I would like to join the victornoel request, It could be a massive improvements, also I'm using k9s and lens instead of podman for this only. I just would like to suggest adding "All Namespaces" also.