k8s批量更新deployment - Tue, Apr 14, 2020
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"]}}}]}}}}'