我创造了一个这样的秘密:
kubectl create secret generic test --from-literal=username=testuser --from-literal=password=12345
我想将用户名更新为,testuser2
但我只想使用kubectl patch --type='json'
.
这就是我尝试这样做的方式:
kubectl patch secret test --type='json' -p='[{"data":{"username": "testuser 2"}}]' -v=1
但我收到:
"" 无效
请记住,我想使用 选项来执行此操作--type='json'
,没有其他解决方法。