K
Q

Move pods between namespace

January 15, 2020

Not a big deal, but just wondering what is best practice for moving pods from one namespace to another?

Do you just

kubectl delete
and
kubectl apply
?

-- Chris G.
kubernetes

1 Answer

January 15, 2020

You cannot "move" a resource to another namespace. There might be resource with same name in the other namespace already.

So yes, you need to delete the existing pod and recreate it in the other namespace.

-- Shashank V
Source: StackOverflow