我想通过kubectl patch命令更新已部署的configmap,但是我不熟悉补丁语法。试了一下,发现没有效果
这是我的configmap
apiVersion: cloudcore.config.kubeedge.io/v1alpha2
kind: CloudCore
kubeAPIConfig:
kubeConfig: ""
master: ""
modules:
cloudHub:
advertiseAddress:
- 10.102.26.35
dnsNames:
-
nodeLimit: 1000
tlsCAFile: /etc/kubeedge/ca/rootCA.crt
tlsCertFile: /etc/kubeedge/certs/edge.crt
tlsPrivateKeyFile: /etc/kubeedge/certs/edge.key
unixsocket:
address: unix:///var/lib/kubeedge/kubeedge.sock
enable: true
websocket:
address: 0.0.0.0
enable: true
port: 10000
quic:
address: 0.0.0.0
enable: false
maxIncomingStreams: 10000
port: 10001
https:
address: 0.0.0.0
enable: true
port: 10002
cloudStream:
enable: true
streamPort: 10003
tunnelPort: 10004
dynamicController:
enable: false
router:
enable: false
iptablesManager:
enable: true
mode: external
我想用192.168.1.20代替10.102.26.35 ip
我试着使用下面的命令,但是它不工作,有人可以帮助我
kubectl patch configmap cloudcore -n kubeedge --type merge -p '{"data":{"advertiseAddress":"["10.102.26.35", "192.168.1.20"]"}}'
按照这个SO,没有办法添加而不替换。Configmaps不理解结构数据。
有关更多信息,请参阅此SO和Doc