【发布时间】:2020-01-26 15:34:48
【问题描述】:
我在 kubernetes 的默认命名空间中创建了一个 pod,但现在我想将 pod 移动到我当前创建的 dabai-fat 命名空间。我正在尝试修改 yaml 文件,但它给出了错误:
the namespace of the object (dabai-fat) does not match the namespace on the request (default)
我应该怎么做才能让它工作,我应该删除旧的 pod 并创建一个新的 pod 吗?
【问题讨论】:
-
试试这个 -> kubectl get pod
-n -o yaml --export mypod.yml ; kubectl apply --namespace= –f mypod.yml
标签: kubernetes