kubernetes 命令“kubectl label pod”执行错误

toiithl6  于 2023-06-21  发布在  Kubernetes
关注(0)|答案(1)|浏览(183)

我想分离出一个分离舱。所以我执行命令"kubeclt label pod app =--overwrite"

✘ 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

那有什么问题?
我只想把分离舱从部署中分离出来!有人能告诉我怎么修吗?

ohtdti5x

ohtdti5x1#

您也可以尝试编辑或删除其pod规范中的标签:
kubectl edit pod myapp-deploy-848987f4fb-wc5v2

相关问题