英文:
the command "kubectl label pod" execute error
问题
我想要将一个Pod从其部署中隔离开来。所以我执行了以下命令“kubeclt label pod
✘ yanchampion@yanchampiondeMacBook-Pro ~ kubectl -n test1 label pod myapp-deploy-848987f4fb-wc5v2 app=newname-debug --overwrite
Error from server (InternalError): Internal error occurred: replace operation does not apply: doc is missing key: /spec/containers/0/env/ : missing value
这是部署Pod的信息:
yanchampion@yanchampiondeMacBook-Pro ~ kubectl -n test1 get pod |grep myapp-deploy
myapp-deploy-848987f4fb-wc5v2 1/1 Running 0 5d8h
所以问题是什么?
我只是想将Pod从其部署中隔离开!有人可以告诉我如何修复它吗?
英文:
I want to isolate a pod from its deployment. So I execute the command “kubeclt label pod <pod-name> app=<newname> --overwrite” Just like
✘ yanchampion@yanchampiondeMacBook-Pro ~ kubectl -n test1 label pod myapp-deploy-848987f4fb-wc5v2 app=newname-debug --overwrite
Error from server (InternalError): Internal error occurred: replace operation does not apply: doc is missing key: /spec/containers/0/env/ : missing value
Here is the deployment pod info
yanchampion@yanchampiondeMacBook-Pro ~ kubectl -n test1 get pod |grep myapp-deploy
myapp-deploy-848987f4fb-wc5v2 1/1 Running 0 5d8h
So What's the problem?
I just want to isolate the pod from its deployment!
Someone can tell me how to fix it?
答案1
得分: 1
你可以尝试编辑或删除其 Pod 规范中的标签:
kubectl edit pod myapp-deploy-848987f4fb-wc5v2
英文:
You could also try to edit or remove the label from its pod spec:
kubectl edit pod myapp-deploy-848987f4fb-wc5v2
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论