curl调用apiserver操作pod
更新镜像版本:
curl -X PATCH \
-H "content-type: application/strategic-merge-patch+json" \
-H "Authorization:Bearer eyJh******JkA" \
-d '{"spec":{"template":{"spec":{"containers":[{"name":"nsfw-caffe","image":"registry.cn-hangzhou.aliyuncs.com/sre_pub/nsfw-caffe-cpu:20200423"}]}}}}' \
"http://172.16.0.21:30009/k8s-api/apis/apps/v1/namespaces/test/deployments/nsfw-caffe"
删除Pod:
curl -X DELETE \
-H "Content-Type: application/yaml" \
-H "Authorization:Bearer eyJh******JkA" \
"http://172.16.0.21:30009/k8s-api/api/v1/namespaces/test/pods?labelSelector=app%3dnsfw-caffe"