Subject: Re: bug#59797: 30.0.50; [wishlist] Using namespaces in Tramp's kubernetes integration

From: Michael Albinus <[email-masked]>
Date: Mon, 05 Dec 2022 16:54:47 +0100

Filipp Gunbin <[email-masked]> writes:

> Hi,

Hi Filipp,

> My motivation behind adding limited k8s support to Tramp was to be able
> to login into pod.  A service is a more high-level abstraction, you
> cannot log into service, as there're some particular pods behind it.
> From my limited knowledge and experience of k8s, listing pods in the
> current namespace is ok.  We could add more scenarios when the need
> arises.

I don't speak about services in general. I speak about pods.

Imagine, you have "pod1" in your current context, and "pod2" in another
namespace, call it "another-namespace".

"kubectl get pods" shows you "pod1". "kubectl get pods --namespace
another-namespace" shows you "pod2".

"kubectl exec pod1 -it -- /bin/sh" access pod1 in your current
context. This is what we use when we access via remote file name syntax
"/kubernetes:pod1:".

pod2 is not accessible in your current context. But you could apply
"kubectl exec pod2 -it --namespace another-namespace -- /bin/sh". This
is what I mean with remote-file name syntax "/kubernetes:pod1.another-namespace:".

Is this possible?

> Filipp

Best regards, Michael.