k8s批量更新deployment

k8s批量更新deployment

kubectl patch deployment $(kubectl get deployment -n iot | grep mns | awk '{print $1}') -n iot -p '{"spec":{"template":{"spec":{"containers":[{"name": "iotx-foundry-mns","image":"docker.io/csiot/iotx-foundry-mns:latest"}]}}}}'
kubectl patch deployment $(kubectl get deployment -n iot | grep mns | awk '{print $1}') -n iot -p '{"spec":{"template":{"spec":{"containers":[{"name": "iotx-foundry-mns","livenessProbe": {"exec": {"command": ["/bin/sh","-c","grpc-health-probe -addr=:8080 --tls -tls-ca-cert /etc/ssl/iotx-foundry/ca.cert -tls-server-name=sentel.cloudstone.com"]}}}]}}}}'

转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论,也可以邮件至 wind.kaisa@gmail.com

×

喜欢就点赞,疼爱就打赏