\r\nresources:\r\nrequests:\r\ncpu: \"1m\"\r\n<\/pre>\n\u53e6\u4e00\u65b9\u9762\uff0c\u542f\u7528 CPU \u9650\u5236\u53ef\u80fd\u4f1a\u5728\u8282\u70b9\u7684 CPU \u6ca1\u6709\u5145\u5206\u5229\u7528\u7684\u60c5\u51b5\u4e0b\uff0c\u5bf9 Pod \u8fdb\u884c\u4e0d\u5fc5\u8981\u5730\u8282\u6d41\uff0c\u8fd9\u4e5f\u4f1a\u5bfc\u81f4\u5ef6\u8fdf\u589e\u52a0\u3002\u4eba\u4eec\u4e5f\u8ba8\u8bba\u8fc7\u5173\u4e8e Linux \u5185\u6838\u4e2d\u7684 CPU CFS \u914d\u989d\uff0c\u548c\u56e0\u4e3a\u8bbe\u7f6e\u4e86 CPU \u9650\u5236\u5e76\u5173\u95ed CFS \u914d\u989d\u800c\u5bfc\u81f4\u7684 CPU \u8282\u6d41\u95ee\u9898\u3002CPU \u9650\u5236\u9020\u6210\u7684\u95ee\u9898\u53ef\u80fd\u4f1a\u6bd4\u5b83\u80fd\u89e3\u51b3\u7684\u95ee\u9898\u8fd8\u591a\u3002\u60f3\u4e86\u89e3\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u67e5\u770b\u4e0b\u9762\u7684\u94fe\u63a5\u3002<\/p>\n
\u5185\u5b58\u8fc7\u91cf\u4f7f\u7528\u4f1a\u7ed9\u6211\u4eec\u5e26\u6765\u66f4\u591a\u9ebb\u70e6\u3002\u8fbe\u5230 CPU \u9650\u5236\u5c06\u5bfc\u81f4\u8282\u6d41\uff0c\u8fbe\u5230\u5185\u5b58\u9650\u5236\u4f1a\u5bfc\u81f4 Pod \u88ab\u6740\u3002\u89c1\u8fc7 OOMkill\uff08\u56e0\u5185\u5b58\u4e0d\u8db3\u800c\u88ab\u6740\u6b7b\uff09\u5417\uff1f\u6211\u4eec\u8981\u8bf4\u7684\u5c31\u662f\u8fd9\u4e2a\u610f\u601d\u3002\u60f3\u8981\u5c3d\u91cf\u51cf\u5c11\u8fd9\u7c7b\u72b6\u51b5\uff1f\u90a3\u5c31\u4e0d\u8981\u8fc7\u91cf\u4f7f\u7528\u5185\u5b58\uff0c\u5e76\u4f7f\u7528 Guaranteed QoS\uff08Quality of Service\uff09\u5c06\u5185\u5b58\u8bf7\u6c42\u8bbe\u7f6e\u4e3a\u4e0e\u9650\u5236\u76f8\u7b49\uff0c\u5c31\u50cf\u4e0b\u9762\u7684\u4f8b\u5b50\u90a3\u6837\u3002\u4e86\u89e3\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u53c2\u8003 Henning Jacobs\uff08Zalando\uff09\u7684\u6f14\u8bb2\u3002<\/p>\n
https:\/\/www.slideshare.net\/try_except_\/optimizing-kubernetes-resource-requestslimits-for-costefficiency-and-latency-highload<\/p>\n
Burstable\uff08\u5bb9\u6613\u5e26\u6765\u66f4\u591a OOMkilled\uff09\uff1a<\/p>\n
\r\nresources:\r\nrequests:\r\nmemory: \"128Mi\"\r\ncpu: \"500m\"\r\nlimits:\r\nmemory: \"256Mi\"\r\ncpu: 2\r\n<\/pre>\nGuaranteed\uff1a<\/p>\n
\r\nresources:\r\nrequests:\r\nmemory: \"128Mi\"\r\ncpu: 2\r\nlimits:\r\nmemory: \"128Mi\"\r\ncpu: 2\r\n<\/pre>\n\u90a3\u4e48\u6211\u4eec\u8bbe\u7f6e\u8d44\u6e90\u65f6\u6709\u4ec0\u4e48\u8bc0\u7a8d\u5462\uff1f<\/p>\n
\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528 metrics-server \u67e5\u770b Pod\uff08\u4ee5\u53ca\u5176\u4e2d\u7684\u5bb9\u5668\uff09\u7684\u5f53\u524d CPU \u548c\u5185\u5b58\u4f7f\u7528\u60c5\u51b5\u3002\u4f60\u53ef\u80fd\u5df2\u7ecf\u542f\u7528\u5b83\u4e86\u3002\u53ea\u9700\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u5373\u53ef\uff1a<\/p>\n
\r\nkubectl top pods\r\nkubectl top pods --containers\r\nkubectl top nodes\r\n<\/pre>\n\u4e0d\u8fc7\uff0c\u8fd9\u4e9b\u53ea\u4f1a\u663e\u793a\u5f53\u524d\u7684\u4f7f\u7528\u60c5\u51b5\u3002\u8981\u5927\u81f4\u4e86\u89e3\u8fd9\u4e9b\u6570\u636e\u7684\u8bdd\u8fd9\u5c31\u591f\u7528\u4e86\uff0c\u4f46\u6211\u4eec\u5230\u5934\u6765\u662f\u5e0c\u671b\u80fd\u53ca\u65f6\u770b\u5230\u8fd9\u4e9b\u4f7f\u7528\u91cf\u6307\u6807\uff08\u4ee5\u56de\u7b54\u8bf8\u5982\uff1a\u6628\u5929\u4e0a\u5348 CPU \u4f7f\u7528\u91cf\u7684\u5cf0\u503c\u7b49\u95ee\u9898\uff09\u3002\u4e3a\u6b64\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528 Prometheus \u548c DataDog \u7b49\u5de5\u5177\u3002\u5b83\u4eec\u53ea\u662f\u4ece metrics-server \u63a5\u6536\u5ea6\u91cf\u6570\u636e\u5e76\u5b58\u50a8\u4e0b\u6765\uff0c\u7136\u540e\u6211\u4eec\u5c31\u80fd\u67e5\u8be2\u548c\u7ed8\u5236\u8fd9\u4e9b\u6570\u636e\u4e86\u3002<\/p>\n
VerticalPodAutoscaler \u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u81ea\u52a8\u5316\u8fd9\u4e00\u624b\u52a8\u8fc7\u7a0b\u2014\u2014\u53ca\u65f6\u67e5\u770b cpu\/ \u5185\u5b58\u7684\u4f7f\u7528\u60c5\u51b5\uff0c\u5e76\u57fa\u4e8e\u8fd9\u4e9b\u6570\u636e\u518d\u8bbe\u7f6e\u65b0\u7684\u8bf7\u6c42\u548c\u9650\u5236\u3002<\/p>\n
https:\/\/cloud.google.com\/kubernetes-engine\/docs\/concepts\/verticalpodautoscaler<\/p>\n
\u6709\u6548\u5229\u7528\u8ba1\u7b97\u8d44\u6e90\u4e0d\u662f\u4e00\u4ef6\u5bb9\u6613\u7684\u4e8b\u60c5\uff0c\u5c31\u50cf\u4e0d\u505c\u5730\u73a9\u4fc4\u7f57\u65af\u65b9\u5757\u3002\u5982\u679c\u6211\u4eec\u53d1\u73b0\u81ea\u5df1\u82b1\u4e86\u5927\u7b14\u94b1\u8d2d\u4e70\u8ba1\u7b97\u8d44\u6e90\uff0c\u53ef\u662f\u5e73\u5747\u5229\u7528\u7387\u5374\u5f88\u4f4e\uff08\u6bd4\u5982\u5927\u7ea6 10%\uff09\uff0c\u90a3\u4e48\u6211\u4eec\u53ef\u80fd\u5c31\u9700\u8981 AWS Fargate \u6216\u57fa\u4e8e Virtual Kubelet \u7684\u4ea7\u54c1\u3002\u5b83\u4eec\u4e3b\u8981\u4f7f\u7528\u65e0\u670d\u52a1\u5668 \/ \u6309\u4f7f\u7528\u91cf\u4ed8\u8d39\u7684\u7684\u8ba1\u8d39\u6a21\u5f0f\uff0c\u8fd9\u5bf9\u6211\u4eec\u6765\u8bf4\u53ef\u80fd\u4f1a\u66f4\u7701\u94b1\u3002<\/p>\n
2. liveness \u548c readiness \u63a2\u9488<\/strong><\/div>\n\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cKubernetes \u4e0d\u4f1a\u6307\u5b9a\u4efb\u4f55 liveness \u548c readiness \u63a2\u9488\u3002\u6709\u65f6\u5b83\u4f1a\u4e00\u76f4\u4fdd\u6301\u8fd9\u79cd\u72b6\u6001\u2026\u2026<\/p>\n
\u4f46\u5982\u679c\u51fa\u73b0\u4e0d\u53ef\u6062\u590d\u7684\u9519\u8bef\uff0c\u6211\u4eec\u7684\u670d\u52a1\u5c06\u5982\u4f55\u91cd\u65b0\u542f\u52a8\u5462\uff1f\u8d1f\u8f7d\u5747\u8861\u5668\u5982\u4f55\u77e5\u9053\u7279\u5b9a\u7684 Pod \u53ef\u4ee5\u5f00\u59cb\u5904\u7406\u6d41\u91cf\uff0c\u6216\u80fd\u5904\u7406\u66f4\u591a\u6d41\u91cf\u5462\uff1f<\/p>\n
\u4eba\u4eec\u901a\u5e38\u4e0d\u77e5\u9053\u8fd9\u4e24\u8005\u95f4\u7684\u533a\u522b\u3002<\/p>\n
\u5982\u679c\u63a2\u9488\u5931\u8d25\uff0cliveness \u63a2\u9488\u5c06\u91cd\u65b0\u542f\u52a8 Pod
\nReadiness \u63a2\u9488\u5931\u8d25\u65f6\uff0c\u4f1a\u65ad\u5f00\u6545\u969c Pod \u4e0e Kubernetes \u670d\u52a1\u7684\u8fde\u63a5\uff08\u6211\u4eec\u53ef\u4ee5\u7528kubectl get endpoints\u68c0\u67e5\u8fd9\u4e00\u70b9\uff09\uff0c\u5e76\u4e14\u76f4\u5230\u8be5\u63a2\u9488\u6062\u590d\u6b63\u5e38\u4e4b\u524d\uff0c\u4e0d\u4f1a\u5411\u8be5 Pod \u53d1\u9001\u4efb\u4f55\u6d41\u91cf\u3002
\n\u5b83\u4eec\u4e24\u4e2a\u90fd\u8fd0\u884c\u5728\u6574\u4e2a Pod \u751f\u547d\u5468\u671f\u4e2d\u3002\u8fd9\u4e00\u70b9\u662f\u5f88\u91cd\u8981\u7684\u3002<\/p>\n
\u4eba\u4eec\u901a\u5e38\u8ba4\u4e3a\uff0creadiness \u63a2\u9488\u53ea\u5728\u5f00\u59cb\u65f6\u8fd0\u884c\uff0c\u4ee5\u5224\u65ad Pod \u4f55\u65f6 Ready \u5e76\u53ef\u4ee5\u5f00\u59cb\u5904\u7406\u6d41\u91cf\u3002\u4f46\u8fd9\u53ea\u662f\u5b83\u7684\u4e00\u4e2a\u7528\u4f8b\u800c\u5df2\u3002<\/p>\n
\u5b83\u7684\u53e6\u4e00\u4e2a\u7528\u4f8b\u662f\u5728\u4e00\u4e2a Pod \u7684\u751f\u547d\u5468\u671f\u4e2d\u5224\u65ad\u5b83\u662f\u5426\u56e0\u8fc7\u70ed\u800c\u65e0\u6cd5\u5904\u7406\u592a\u591a\u6d41\u91cf\uff08\u6216\u4e00\u9879\u6602\u8d35\u7684\u8ba1\u7b97\uff09\uff0c\u8fd9\u6837\u6211\u4eec\u5c31\u4e0d\u4f1a\u8ba9\u5b83\u505a\u66f4\u591a\u5de5\u4f5c\uff0c\u800c\u662f\u8ba9\u5b83\u51b7\u5374\u4e0b\u6765\uff1b\u7b49\u5230 readiness \u63a2\u9488\u6210\u529f\uff0c\u6211\u4eec\u4f1a\u518d\u7ed9\u5b83\u53d1\u9001\u66f4\u591a\u6d41\u91cf\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff08\u5f53 readiness \u63a2\u9488\u5931\u8d25\u65f6\uff09\uff0c\u5982\u679c liveness \u63a2\u9488\u4e5f\u5931\u8d25\u5c31\u4f1a\u975e\u5e38\u5f71\u54cd\u6548\u7387\u4e86\u3002\u6211\u4eec\u4e3a\u4ec0\u4e48\u8981\u91cd\u65b0\u542f\u52a8\u4e00\u4e2a\u5065\u5eb7\u7684\u3001\u6b63\u5728\u505a\u5927\u91cf\u5de5\u4f5c\u7684 Pod \u5462\uff1f<\/p>\n
\u6709\u65f6\u5019\uff0c\u4e0d\u6307\u5b9a\u4efb\u4f55\u63a2\u9488\u90fd\u6bd4\u6307\u5b9a\u4e00\u4e2a\u9519\u8bef\u7684\u63a2\u9488\u8981\u597d\u3002\u5982\u4e0a\u6240\u8ff0\uff0c\u5982\u679c liveness \u63a2\u9488\u7b49\u4e8e readiness \u63a2\u9488\uff0c\u6211\u4eec\u5c06\u9047\u5230\u5f88\u5927\u7684\u9ebb\u70e6\u3002\u6211\u4eec\u4e00\u5f00\u59cb\u53ef\u80fd\u53ea\u4f1a\u6307\u5b9a readiness \u63a2\u9488\uff0c\u56e0\u4e3a liveness \u63a2\u9488\u592a\u5371\u9669\u4e86\u3002<\/p>\n
https:\/\/twitter.com\/sszuecs\/status\/1175803113204269059<\/p>\n
https:\/\/srcco.de\/posts\/kubernetes-liveness-probes-are-dangerous.html<\/p>\n
\u5982\u679c\u4f60\u7684\u4efb\u4f55\u5171\u4eab\u4f9d\u8d56\u9879\u51fa\u73b0\u6545\u969c\uff0c\u5c31\u4e0d\u8981\u8ba9\u4efb\u4f55\u4e00\u4e2a\u63a2\u9488\u5931\u8d25\uff0c\u5426\u5219\u5b83\u5c06\u5bfc\u81f4\u6240\u6709 Pod \u7684\u7ea7\u8054\u6545\u969c\u3002\u6211\u4eec\u8fd9\u662f\u642c\u8d77\u77f3\u5934\u7838\u81ea\u5df1\u7684\u811a\u3002<\/p>\n
https:\/\/blog.colinbreck.com\/kubernetes-liveness-and-readiness-probes-how-to-avoid-shooting-yourself-in-the-foot\/<\/p>\n
3. \u5728\u6240\u6709 HTTP \u670d\u52a1\u4e0a\u542f\u7528\u8d1f\u8f7d\u5747\u8861\u5668<\/strong><\/div>\n\u6211\u4eec\u7684\u96c6\u7fa4\u4e2d\u53ef\u80fd\u6709\u5f88\u591a HTTP \u670d\u52a1\uff0c\u5e76\u4e14\u6211\u4eec\u5e0c\u671b\u5c06\u8fd9\u4e9b\u670d\u52a1\u5bf9\u5916\u754c\u516c\u5f00\u3002<\/p>\n
\u5982\u679c\u6211\u4eec\u5c06 Kubernetes \u670d\u52a1\u4ee5type: LoadBalancer\u7684\u5f62\u5f0f\u516c\u5f00\uff0c\u90a3\u4e48\u5b83\u7684\u63a7\u5236\u5668\uff08\u53d6\u51b3\u4e8e\u4f9b\u5e94\u5546\uff09\u5c06\u63d0\u4f9b\u5e76\u534f\u8c03\u4e00\u4e2a\u5916\u90e8\u8d1f\u8f7d\u5747\u8861\u5668\uff08\u4e0d\u4e00\u5b9a\u662f L7 \u7684\uff0c\u66f4\u53ef\u80fd\u662f L4 lb\uff09\uff1b\u5f53\u6211\u4eec\u521b\u5efa\u5f88\u591a\u8fd9\u79cd\u8d44\u6e90\u65f6\uff0c\u5b83\u4eec\u53ef\u80fd\u4f1a\u53d8\u5f97\u5f88\u6602\u8d35\uff08\u5916\u90e8\u9759\u6001 ipv4 \u5730\u5740\u3001\u8ba1\u7b97\u3001\u6309\u79d2\u8ba1\u8d39\u2026\u2026\uff09\u3002<\/p>\n
\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u5171\u4eab\u540c\u4e00\u4e2a\u5916\u90e8\u8d1f\u8f7d\u5747\u8861\u5668\u53ef\u80fd\u4f1a\u66f4\u597d\u4e9b\uff0c\u8fd9\u65f6\u6211\u4eec\u5c06\u670d\u52a1\u4ee5type: NodePort\u7684\u5f62\u5f0f\u516c\u5f00\u3002\u6216\u8005\u66f4\u597d\u7684\u65b9\u6cd5\u662f\uff0c\u90e8\u7f72 nginx-ingress-controller\uff08\u6216 traefik\uff09\u4e4b\u7c7b\u7684\u4e1c\u897f\uff0c\u4f5c\u4e3a\u516c\u5f00\u7ed9\u8fd9\u4e2a\u5916\u90e8\u8d1f\u8f7d\u5747\u8861\u5668\u7684\u5355\u4e2a NodePort \u7aef\u70b9\uff0c\u5e76\u57fa\u4e8e Kubernetes ingress \u8d44\u6e90\u5728\u96c6\u7fa4\u4e2d\u8def\u7531\u6d41\u91cf\u3002<\/p>\n
\u5176\u4ed6\u76f8\u4e92\u901a\u4fe1\u7684\u96c6\u7fa4\u5185\uff08\u5fae\uff09\u670d\u52a1\u53ef\u4ee5\u901a\u8fc7 ClusterIP \u670d\u52a1\u548c\u5f00\u7bb1\u5373\u7528\u7684 DNS \u670d\u52a1\u53d1\u73b0\u6765\u901a\u4fe1\u3002\u6ce8\u610f\u4e0d\u8981\u4f7f\u7528\u5b83\u4eec\u7684\u516c\u5171 DNS\/IP\uff0c\u56e0\u4e3a\u8fd9\u53ef\u80fd\u4f1a\u5f71\u54cd\u5b83\u4eec\u7684\u5ef6\u8fdf\u548c\u4e91\u6210\u672c\u3002<\/p>\n
4. \u65e0 Kubernetes \u611f\u77e5\u7684\u96c6\u7fa4\u81ea\u52a8\u7f29\u653e<\/strong><\/div>\n\u5728\u96c6\u7fa4\u4e2d\u6dfb\u52a0\u8282\u70b9\u6216\u5220\u9664\u8282\u70b9\u65f6\uff0c\u4e0d\u5e94\u8be5\u8003\u8651\u4e00\u4e9b\u7b80\u5355\u7684\u5ea6\u91cf\u6307\u6807\uff0c\u6bd4\u5982\u8fd9\u4e9b\u8282\u70b9\u7684 CPU \u5229\u7528\u7387\u3002\u5728\u8c03\u5ea6 Pod \u65f6\uff0c\u6211\u4eec\u9700\u8981\u6839\u636e\u8bb8\u591a\u8c03\u5ea6\u7ea6\u675f\u6765\u8fdb\u884c\u51b3\u7b56\uff0c\u6bd4\u5982 Pod \u548c\u8282\u70b9\u7684\u4eb2\u5bc6\u5173\u7cfb\uff08affinities\uff09\u3001\u6c61\u70b9\uff08taints\uff09\u548c\u5bb9\u5fcd\uff08tolerations\uff09\u3001\u8d44\u6e90\u8bf7\u6c42\uff08resource requests\uff09\u3001QoS \u7b49\u3002\u8ba9\u4e00\u4e2a\u4e0d\u4e86\u89e3\u8fd9\u4e9b\u7ea6\u675f\u7684\u5916\u90e8\u81ea\u52a8\u7f29\u653e\u5668\uff08autoscaler\uff09\u6765\u5904\u7406\u7f29\u653e\u53ef\u80fd\u4f1a\u62db\u6765\u9ebb\u70e6\u3002<\/p>\n
\u5047\u8bbe\u6709\u4e00\u4e2a\u65b0\u7684 Pod \u8981\u88ab\u8c03\u5ea6\uff0c\u4f46\u662f\u6240\u6709\u53ef\u7528\u7684 CPU \u90fd\u88ab\u8bf7\u6c42\u4e86\uff0c\u5e76\u4e14 Pod \u5361\u5728\u4e86 Pending \u72b6\u6001\u3002\u53ef\u662f\u5916\u90e8\u81ea\u52a8\u7f29\u653e\u5668\u4f1a\u67e5\u770b\u5f53\u524d\u7684\u5e73\u5747 CPU \u4f7f\u7528\u7387\uff08\u4e0d\u662f\u8bf7\u6c42\u6570\u91cf\uff09\uff0c\u7136\u540e\u51b3\u5b9a\u4e0d\u6269\u5bb9\uff08\u4e0d\u6dfb\u52a0\u65b0\u7684\u8282\u70b9\uff09\u3002\u7ed3\u679c Pod \u4e5f\u4e0d\u4f1a\u88ab\u8c03\u5ea6\u3002<\/p>\n
\u7f29\u5bb9\uff08\u4ece\u96c6\u7fa4\u4e2d\u5220\u9664\u8282\u70b9\uff09\u603b\u662f\u66f4\u96be\u4e00\u4e9b\u3002\u5047\u8bbe\u6211\u4eec\u6709\u4e00\u4e2a\u6709\u72b6\u6001\u7684 Pod\uff08\u8fde\u63a5\u4e86\u6301\u4e45\u5377\uff09\uff0c\u7531\u4e8e\u6301\u4e45\u5377\uff08persistent volumes\uff09\u901a\u5e38\u662f\u5c5e\u4e8e\u7279\u5b9a\u53ef\u7528\u533a\u57df\u7684\u8d44\u6e90\uff0c\u5e76\u4e14\u6ca1\u6709\u5728\u8be5\u533a\u57df\u4e2d\u590d\u5236\uff0c\u6211\u4eec\u81ea\u5b9a\u4e49\u7684\u81ea\u52a8\u7f29\u653e\u5668\u4f1a\u5220\u9664\u4e00\u4e2a\u5e26\u6709\u6b64 Pod \u7684\u8282\u70b9\uff0c\u800c\u8c03\u5ea6\u5668\u65e0\u6cd5\u5c06\u5176\u8c03\u5ea6\u5230\u53e6\u4e00\u4e2a\u8282\u70b9\u4e0a\uff0c\u56e0\u4e3a\u8fd9\u4e2a Pod \u53ea\u80fd\u5f85\u5728\u6301\u4e45\u78c1\u76d8\u6240\u5728\u7684\u90a3\u4e2a\u53ef\u7528\u533a\u57df\u91cc\u3002Pod \u5c06\u518d\u6b21\u9677\u5165 Pending \u72b6\u6001\u3002<\/p>\n
\u793e\u533a\u6b63\u5728\u5e7f\u6cdb\u4f7f\u7528 cluster-autoscaler\uff0c\u5b83\u8fd0\u884c\u5728\u96c6\u7fa4\u4e2d\uff0c\u80fd\u4e0e\u5927\u591a\u6570\u4e3b\u8981\u7684\u516c\u5171\u4e91\u4f9b\u5e94\u5546 API \u96c6\u6210\uff1b\u5b83\u53ef\u4ee5\u7406\u89e3\u6240\u6709\u8fd9\u4e9b\u7ea6\u675f\uff0c\u5e76\u80fd\u5728\u4e0a\u8ff0\u60c5\u51b5\u4e0b\u6269\u5bb9\u3002\u5b83\u8fd8\u80fd\u641e\u6e05\u695a\u662f\u5426\u53ef\u4ee5\u5728\u4e0d\u5f71\u54cd\u6211\u4eec\u8bbe\u7f6e\u7684\u4efb\u4f55\u7ea6\u675f\u7684\u524d\u63d0\u4e0b\u4f18\u96c5\u5730\u7f29\u5bb9\uff0c\u4ece\u800c\u8282\u7701\u6211\u4eec\u7684\u8ba1\u7b97\u6210\u672c\u3002<\/p>\n
https:\/\/github.com\/kubernetes\/autoscaler\/tree\/master\/cluster-autoscaler<\/p>\n
5. \u4e0d\u8981\u4f7f\u7528 IAM\/RBAC \u7684\u80fd\u529b<\/strong><\/div>\n\u4e0d\u8981\u4f7f\u7528 IAM Users \u6c38\u4e45\u5b58\u50a8\u673a\u5668\u548c\u5e94\u7528\u7a0b\u5e8f\u7684\u79d8\u94a5\uff0c\u800c\u8981\u4f7f\u7528\u89d2\u8272\u548c\u670d\u52a1\u5e10\u6237\u751f\u6210\u7684\u4e34\u65f6\u79d8\u94a5\u3002<\/p>\n
\u6211\u4eec\u7ecf\u5e38\u770b\u5230\u8fd9\u79cd\u60c5\u51b5\uff0c\u90a3\u5c31\u662f\u5728\u5e94\u7528\u7a0b\u5e8f\u914d\u7f6e\u4e2d\u786c\u7f16\u7801\u8bbf\u95ee\uff08access \uff09\u548c\u5bc6\u94a5\uff08secret\uff09\uff0c\u5e76\u5728\u4f7f\u7528 Cloud IAM \u65f6\u4ece\u6765\u4e0d\u8f6e\u6362\u5bc6\u94a5\u3002\u6211\u4eec\u5e94\u8be5\u5c3d\u91cf\u4f7f\u7528 IAM \u89d2\u8272\u548c\u670d\u52a1\u5e10\u6237\u6765\u4ee3\u66ff Users\u3002<\/p>\n
\u8bf7\u8df3\u8fc7 kube2iam\uff0c\u76f4\u63a5\u6309\u7167\u0160t\u011bp\u00e1n Vran\u00fd\u5728\u8fd9\u7bc7\u535a\u6587\u4e2d\u4ecb\u7ecd\u7684\u90a3\u6837\uff0c\u4f7f\u7528\u670d\u52a1\u8d26\u6237\u7684 IAM \u89d2\u8272\u3002<\/p>\n
https:\/\/blog.pipetail.io\/posts\/2020-04-13-more-eks-tips\/<\/p>\n
\r\napiVersion: v1\r\nkind: ServiceAccount\r\nmetadata:\r\nannotations:\r\neks.amazonaws.com\/role-arn: arn:aws:iam::123456789012:role\/my-app-role\r\nname: my-serviceaccount\r\nnamespace: default\r\n<\/pre>\n\u53ea\u6709\u4e00\u4e2a annotation\u3002\u6ca1\u90a3\u4e48\u96be\u505a\u5427\u3002<\/p>\n
\u53e6\u5916\uff0c\u5f53\u670d\u52a1\u5e10\u6237\u6216\u5b9e\u4f8b\u914d\u7f6e\u6587\u4ef6\u4e0d\u9700\u8981admin\u548ccluster-admin\u6743\u9650\u65f6\uff0c\u4e5f\u4e0d\u8981\u7ed9\u5b83\u4eec\u8fd9\u4e9b\u6743\u9650\u3002\u8fd9\u6709\u70b9\u56f0\u96be\uff0c\u5c24\u5176\u662f\u5728 k8s RBAC \u4e2d\uff0c\u4f46\u4ecd\u7136\u503c\u5f97\u4e00\u8bd5\u3002<\/p>\n
6. Pod \u7684 self anti-affinities<\/strong><\/div>\n\u67d0\u4e2a\u90e8\u7f72\u6709 3 \u4e2a Pod \u526f\u672c\u6b63\u5728\u8fd0\u884c\uff0c\u7136\u540e\u8282\u70b9\u5173\u95ed\u4e86\uff0c\u6240\u6709\u7684\u526f\u672c\u4e5f\u90fd\u968f\u4e4b\u5173\u95ed\u3002\u5c82\u6709\u6b64\u7406\uff1f\u6240\u6709\u526f\u672c\u90fd\u5728\u4e00\u4e2a\u8282\u70b9\u4e0a\u8fd0\u884c\uff1fKubernetes \u96be\u9053\u4e0d\u5e94\u8be5\u5f88\u5389\u5bb3\uff0c\u5e76\u63d0\u4f9b\u9ad8\u53ef\u7528\u6027\u7684\u5417\uff1f\uff01<\/p>\n
\u6211\u4eec\u4e0d\u80fd\u6307\u671b Kubernetes \u8c03\u5ea6\u7a0b\u5e8f\u4e3a\u6211\u4eec\u7684 Pod \u5f3a\u5236\u4f7f\u7528 anti-affinites\u3002\u6211\u4eec\u5fc5\u987b\u663e\u5f0f\u5730\u5b9a\u4e49\u5b83\u4eec\u3002<\/p>\n
\r\n\/\/ omitted for brevity\r\nlabels:\r\napp: zk\r\n\/\/ omitted for brevity\r\naffinity:\r\npodAntiAffinity:\r\nrequiredDuringSchedulingIgnoredDuringExecution:\r\n- labelSelector:\r\nmatchExpressions:\r\n- key: \"app\"\r\noperator: In\r\nvalues:\r\n- zk\r\ntopologyKey: \"kubernetes.io\/hostname\"\r\n<\/pre>\n\u5c31\u662f\u8fd9\u6837\u3002\u8fd9\u6837\u5c31\u80fd\u4fdd\u8bc1 Pod \u88ab\u8c03\u5ea6\u5230\u4e0d\u540c\u7684\u8282\u70b9\u4e0a\uff08\u8fd9\u4ec5\u5728\u8c03\u5ea6\u65f6\u68c0\u67e5\uff0c\u800c\u4e0d\u662f\u5728\u6267\u884c\u65f6\u68c0\u67e5\uff0c\u56e0\u6b64\u9700\u8981requiredDuringSchedulingIgnoredDuringExecution \uff09\u3002<\/p>\n
\u6211\u4eec\u8ba8\u8bba\u7684\u662f\u4e0d\u540c\u8282\u70b9\u540d\u79f0\u4e0a\uff08 topologyKey: \"kubernetes.io\/hostname\" \uff09\u7684 podAntiAffinity\uff0c\u800c\u4e0d\u662f\u4e0d\u540c\u53ef\u7528\u533a\u57df\u7684 podAntiAffinity\u3002\u5982\u679c\u4f60\u786e\u5b9e\u9700\u8981\u5f88\u597d\u7684\u53ef\u7528\u6027\u6c34\u5e73\uff0c\u53ef\u4ee5\u5728\u8fd9\u4e2a\u4e3b\u9898\u4e0a\u518d\u6df1\u5165\u505a\u4e9b\u7814\u7a76\u3002<\/p>\n
7. \u65e0 PodDisruptionBudget<\/strong><\/div>\n\u6211\u4eec\u5728 Kubernetes \u4e0a\u8fd0\u884c\u751f\u4ea7\u8d1f\u8f7d\u3002\u6211\u4eec\u7684\u8282\u70b9\u548c\u96c6\u7fa4\u5fc5\u987b\u4e0d\u65f6\u5347\u7ea7\u6216\u505c\u7528\u3002PodDisruptionBudget\uff08pdb\uff09\u662f\u4e00\u79cd\u7528\u4e8e\u5728\u96c6\u7fa4\u7ba1\u7406\u5458\u548c\u96c6\u7fa4\u7528\u6237\u4e4b\u95f4\u63d0\u4f9b\u670d\u52a1\u4fdd\u8bc1\u7684 API\u3002<\/p>\n
\u8bf7\u786e\u4fdd\u521b\u5efa\u4e86pdb \uff0c\u4ee5\u907f\u514d\u7531\u4e8e\u8282\u70b9\u8017\u5c3d\u800c\u9020\u6210\u4e0d\u5fc5\u8981\u7684\u670d\u52a1\u4e2d\u65ad\u3002<\/p>\n
\r\napiVersion: policy\/v1beta1\r\nkind: PodDisruptionBudget\r\nmetadata:\r\nname: zk-pdb\r\nspec:\r\nminAvailable: 2\r\nselector:\r\nmatchLabels:\r\napp: zookeeper\r\n<\/pre>\n\u4f5c\u4e3a\u4e00\u4e2a\u96c6\u7fa4\u7528\u6237\uff0c\u6211\u4eec\u53ef\u4ee5\u544a\u8bc9\u96c6\u7fa4\u7ba1\u7406\u5458\uff1a\u201c\u563f\uff0c\u6211\u8fd9\u91cc\u6709\u4e2a zookeeper \u670d\u52a1\uff0c\u65e0\u8bba\u5982\u4f55\u6211\u90fd\u5e0c\u671b\u81f3\u5c11\u6709 2 \u4e2a\u526f\u672c\u662f\u59cb\u7ec8\u53ef\u7528\u7684\u201d\u3002<\/p>\n
\u6211\u5728\u8fd9\u7bc7\u535a\u5ba2\u6587\u7ae0\u4e2d\u66f4\u6df1\u5165\u5730\u8ba8\u8bba\u4e86\u8fd9\u4e2a\u8bdd\u9898\u3002<\/p>\n
https:\/\/blog.marekbartik.com\/posts\/2018-06-29_kubernetes-in-production-poddisruptionbudget\/<\/p>\n
8. \u5171\u4eab\u96c6\u7fa4\u4e2d\u6709\u4e0d\u6b62\u4e00\u4e2a\u79df\u6237\u6216\u73af\u5883<\/strong><\/div>\nKubernetes \u547d\u540d\u7a7a\u95f4\u4e0d\u63d0\u4f9b\u4efb\u4f55\u5f3a\u9694\u79bb\u3002<\/p>\n
\u4eba\u4eec\u4f3c\u4e4e\u671f\u671b\uff0c\u5982\u679c\u5c06\u975e\u751f\u4ea7\u8d1f\u8f7d\u653e\u5230\u4e00\u4e2a\u547d\u540d\u7a7a\u95f4\uff0c\u7136\u540e\u5c06\u751f\u4ea7\u8d1f\u8f7d\u653e\u5230\u751f\u4ea7\u547d\u540d\u7a7a\u95f4\uff0c\u90a3\u4e48\u8fd9\u4e9b\u8d1f\u8f7d\u4e4b\u95f4\u5c31\u6c38\u8fdc\u4e0d\u4f1a\u76f8\u4e92\u5f71\u54cd\u4e86\u3002\u6211\u4eec\u53ef\u4ee5\u5728\u67d0\u79cd\u7a0b\u5ea6\u4e0a\u516c\u5e73\u5206\u914d\uff08\u6bd4\u5982\u8d44\u6e90\u7684\u8bf7\u6c42\u548c\u9650\u5236\u3001\u914d\u989d\u3001\u4f18\u5148\u7ea7\uff09\u5e76\u5b9e\u73b0\u9694\u79bb\uff08\u6bd4\u5982 affinities\u3001tolerations\u3001taints \u6216 nodeselectors\uff09\uff0c\u8fdb\u800c\u201c\u7269\u7406\u5730\u201d\u5206\u79bb\u6570\u636e\u5e73\u9762\u4e0a\u7684\u8d1f\u8f7d\uff0c\u4f46\u8fd9\u79cd\u5206\u79bb\u662f\u76f8\u5f53\u590d\u6742\u7684\u3002<\/p>\n
\u5982\u679c\u6211\u4eec\u9700\u8981\u5728\u540c\u4e00\u4e2a\u96c6\u7fa4\u4e2d\u540c\u65f6\u62e5\u6709\u8fd9\u4e24\u79cd\u7c7b\u578b\u7684\u8d1f\u8f7d\uff0c\u90a3\u4e48\u5c31\u5fc5\u987b\u8981\u627f\u62c5\u8fd9\u79cd\u590d\u6742\u6027\u3002\u5982\u679c\u6211\u4eec\u7528\u4e0d\u7740\u5c40\u9650\u5728\u4e00\u4e2a\u96c6\u7fa4\u91cc\uff0c\u800c\u4e14\u518d\u52a0\u4e00\u4e2a\u96c6\u7fa4\u7684\u6210\u672c\u66f4\u4f4e\u65f6\uff08\u6bd4\u5982\u5728\u516c\u5171\u4e91\u4e0a\uff09\uff0c\u90a3\u4e48\u5e94\u8be5\u5c06\u5b83\u4eec\u653e\u5728\u4e0d\u540c\u7684\u96c6\u7fa4\u4e2d\u4ee5\u83b7\u5f97\u66f4\u5f3a\u7684\u9694\u79bb\u7ea7\u522b\u3002<\/p>\n
9. externalTrafficPolicy: Cluster<\/strong><\/div>\n\u7ecf\u5e38\u770b\u5230\u8fd9\u79cd\u60c5\u51b5\uff0c\u6240\u6709\u6d41\u91cf\u90fd\u5728\u96c6\u7fa4\u5185\u8def\u7531\u5230\u4e00\u4e2a NodePort \u670d\u52a1\u4e0a\uff0c\u8be5\u670d\u52a1\u9ed8\u8ba4\u4f7f\u7528 externalTrafficPolicy: Cluster \u3002\u8fd9\u610f\u5473\u7740\u5728\u96c6\u7fa4\u4e2d\u7684\u6bcf\u4e2a\u8282\u70b9\u4e0a\u90fd\u6253\u5f00\u4e86 NodePort\uff0c\u8fd9\u6837\u6211\u4eec\u53ef\u4ee5\u4efb\u9009\u4e00\u4e2a\u6765\u4e0e\u6240\u9700\u7684\u670d\u52a1\uff08\u4e00\u7ec4 Pod\uff09\u901a\u4fe1\u3002<\/p>\n
<\/p>\n
\u901a\u5e38\u60c5\u51b5\u4e0b\uff0cNodePort \u670d\u52a1\u6240\u9488\u5bf9\u7684\u90a3\u4e9b Pod \u5b9e\u9645\u4e0a\u53ea\u8fd0\u884c\u5728\u8fd9\u4e9b\u8282\u70b9\u7684\u4e00\u4e2a\u5b50\u96c6\u4e0a\u3002\u8fd9\u610f\u5473\u7740\uff0c\u5982\u679c\u6211\u4e0e\u4e00\u4e2a\u6ca1\u6709\u8fd0\u884c Pod \u7684\u8282\u70b9\u901a\u4fe1\uff0c\u5b83\u5c06\u4f1a\u628a\u6d41\u91cf\u8f6c\u53d1\u7ed9\u53e6\u4e00\u4e2a\u8282\u70b9\uff0c\u4ece\u800c\u5bfc\u81f4\u989d\u5916\u7684\u7f51\u7edc\u8df3\u8f6c\u5e76\u589e\u52a0\u5ef6\u8fdf\uff08\u5982\u679c\u8282\u70b9\u4f4d\u4e8e\u4e0d\u540c\u7684 AZs \u6216\u6570\u636e\u4e2d\u5fc3\uff0c\u90a3\u4e48\u5ef6\u8fdf\u53ef\u80fd\u4f1a\u5f88\u9ad8\uff0c\u5e76\u4e14\u4f1a\u5e26\u6765\u989d\u5916\u7684\u51fa\u53e3\u6210\u672c\uff09\u3002<\/p>\n
\u5728 Kubernetes \u670d\u52a1\u4e0a\u8bbe\u7f6eexternalTrafficPolicy: Local\uff0c\u5c31\u4e0d\u4f1a\u5728\u6bcf\u4e2a\u8282\u70b9\u4e0a\u90fd\u6253\u5f00 NodePort\uff0c\u53ea\u4f1a\u5728\u5b9e\u9645\u8fd0\u884c Pod \u7684\u8282\u70b9\u4e0a\u5f00\u542f\u5b83\u3002\u5982\u679c\u6211\u4eec\u4f7f\u7528\u4e00\u4e2a\u5916\u90e8\u8d1f\u8f7d\u5747\u8861\u5668\u6765\u68c0\u67e5\u5b83\u7aef\u70b9\u7684\u8fd0\u884c\u72b6\u51b5\uff08\u5c31\u50cf AWS ELB \u6240\u505a\u7684\u90a3\u6837\uff09\uff0c\u5b83\u5c31\u4f1a\u53ea\u5c06\u6d41\u91cf\u53d1\u9001\u5230\u5e94\u8be5\u63a5\u6536\u6d41\u91cf\u7684\u8282\u70b9\u4e0a\uff0c\u8fd9\u6837\u5c31\u80fd\u6539\u5584\u5ef6\u8fdf\u3001\u51cf\u5c11\u8ba1\u7b97\u5f00\u9500\u3001\u964d\u4f4e\u51fa\u53e3\u6210\u672c\u5e76\u63d0\u5347\u5065\u5168\u6027\u3002<\/p>\n
\u6211\u4eec\u53ef\u80fd\u4f1a\u6709\u50cf traefik \u6216 nginx-ingress-controller \u4e4b\u7c7b\u7684\u4e1c\u897f\uff0c\u88ab\u516c\u5f00\u6210 NodePort\uff08\u6216\u4f7f\u7528 NodePort \u7684\u8d1f\u8f7d\u5747\u8861\u5668\uff09\u6765\u5904\u7406\u5165\u53e3 HTTP \u6d41\u91cf\u8def\u7531\uff0c\u800c\u8fd9\u79cd\u8bbe\u7f6e\u53ef\u4ee5\u6781\u5927\u5730\u51cf\u5c11\u6b64\u7c7b\u8bf7\u6c42\u7684\u5ef6\u8fdf\u3002<\/p>\n
\u8fd9\u91cc\u6709\u4e00\u7bc7\u5f88\u68d2\u7684\u535a\u5ba2\u6587\u7ae0\uff0c\u66f4\u6df1\u5165\u5730\u8ba8\u8bba\u4e86 externalTrafficPolicy \u548c\u5b83\u4eec\u7684\u6743\u8861\u53d6\u820d\u3002<\/p>\n
https:\/\/www.asykim.com\/blog\/deep-dive-into-kubernetes-external-traffic-policies<\/p>\n
10. \u628a\u96c6\u7fa4\u5f53\u5ba0\u7269 + \u63a7\u5236\u5e73\u9762\u538b\u529b\u8fc7\u5927<\/strong><\/div>\n\u4f60\u6709\u6ca1\u6709\u8fc7\u8fd9\u6837\u7684\u7ecf\u5386\uff1a\u7ed9\u670d\u52a1\u5668\u53d6 Anton\u3001HAL9000 \u6216 Colossus \u4e4b\u7c7b\u7684\u540d\u5b57\uff08\u90fd\u662f\u5e26\u6897\u7684\u540d\u79f0\uff0c\u8bd1\u6ce8\uff09\uff0c\u6216\u8005\u7ed9\u8282\u70b9\u968f\u673a\u751f\u6210 id\uff0c\u5374\u7ed9\u96c6\u7fa4\u53d6\u4e2a\u6709\u542b\u4e49\u7684\u540d\u79f0\uff1f<\/p>\n
\u8fd8\u53ef\u80fd\u662f\u8fd9\u6837\u7684\u7ecf\u5386\uff1a\u4e00\u5f00\u59cb\u7528 Kubernetes \u505a\u6982\u5ff5\u9a8c\u8bc1\uff0c\u7ed9\u96c6\u7fa4\u53d6\u540d\"testing\"\uff0c\u7ed3\u679c\u5230\u4e86\u751f\u4ea7\u73af\u5883\u8fd8\u6ca1\u7ed9\u5b83\u6539\u540d\uff0c\u7ed3\u679c\u8c01\u90fd\u4e0d\u6562\u78b0\u5b83\uff1f\uff08\u771f\u5b9e\u7684\u6545\u4e8b\uff09<\/p>\n
\u628a\u96c6\u7fa4\u5f53\u5ba0\u7269\u53ef\u4e0d\u662f\u5f00\u73a9\u7b11\u7684\uff0c\u6211\u4eec\u53ef\u80fd\u9700\u8981\u4e0d\u65f6\u5220\u9664\u96c6\u7fa4\uff0c\u6f14\u7ec3\u707e\u96be\u6062\u590d\u5e76\u7ba1\u7406\u6211\u4eec\u7684\u63a7\u5236\u5e73\u9762\u3002\u5bb3\u6015\u89e6\u78b0\u63a7\u5236\u5e73\u9762\u4e0d\u662f\u4e2a\u597d\u5146\u5934\u3002Etcd \u6302\u6389\u4e86\uff1f\u597d\u561e\uff0c\u6211\u4eec\u9047\u5230\u5927\u9ebb\u70e6\u3002<\/p>\n
\u53cd\u8fc7\u6765\u8bf4\uff0c\u63a7\u5236\u5e73\u9762\u4e5f\u4e0d\u8981\u7528\u8fc7\u5934\u4e86\u3002\u4e5f\u8bb8\u968f\u7740\u65f6\u95f4\u7684\u6d41\u901d\uff0c\u63a7\u5236\u5e73\u9762\u53d8\u6162\u4e86\u3002\u8fd9\u5f88\u53ef\u80fd\u662f\u56e0\u4e3a\u6211\u4eec\u521b\u5efa\u4e86\u5f88\u591a\u5bf9\u8c61\u800c\u6ca1\u6709\u8f6e\u6362\u5b83\u4eec\uff08\u4f7f\u7528 helm \u65f6\u5e38\u89c1\u7684\u60c5\u51b5\uff0c\u5b83\u7684\u9ed8\u8ba4\u8bbe\u7f6e\u4e0d\u4f1a\u8f6e\u6362 configmaps\/secrets \u7684\u72b6\u6001\uff0c\u7ed3\u679c\u6211\u4eec\u5728\u63a7\u5236\u5e73\u9762\u4e2d\u4f1a\u6709\u6570\u5343\u4e2a\u5bf9\u8c61\uff09\uff0c\u6216\u8005\u662f\u56e0\u4e3a\u6211\u4eec\u4e0d\u65ad\u4ece kube-api\uff08\u7528\u4e8e\u81ea\u52a8\u4f38\u7f29\u3001CI\/CD\u3001\u76d1\u89c6\u3001\u4e8b\u4ef6\u65e5\u5fd7\u3001\u63a7\u5236\u5668\u7b49\uff09\u4e2d\u5220\u9664\u548c\u7f16\u8f91\u4e86\u5927\u91cf\u5185\u5bb9\u3002<\/p>\n
\u53e6\u5916\uff0c\u8bf7\u68c0\u67e5\u6258\u7ba1 Kubernetes \u63d0\u4f9b\u7684\u201cSLAs\u201d\/SLOs \u548c\u4fdd\u8bc1\u3002\u4f9b\u5e94\u5546\u53ef\u80fd\u4f1a\u4fdd\u8bc1\u63a7\u5236\u5e73\u9762\uff08\u6216\u5176\u5b50\u7ec4\u4ef6\uff09\u7684\u53ef\u7528\u6027\uff0c\u4f46\u4e0d\u80fd\u4fdd\u8bc1\u53d1\u9001\u7ed9\u5b83\u7684\u8bf7\u6c42\u7684 p99 \u5ef6\u8fdf\u6c34\u5e73\u3002\u6362\u53e5\u8bdd\u8bf4\uff0c\u5c31\u7b97\u6211\u4eeckubectl get nodes\u540e\u7528\u4e86 10 \u5206\u949f\u624d\u5f97\u5230\u6b63\u786e\u7ed3\u679c\uff0c\u4e5f\u6ca1\u6709\u8fdd\u53cd\u670d\u52a1\u4fdd\u8bc1\u3002<\/p>\n
11. \u9644\u8d60\u4e00\u6761\uff1a\u4f7f\u7528 latest \u6807\u7b7e<\/strong><\/div>\n\u8fd9\u4e00\u6761\u662f\u5f88\u7ecf\u5178\u7684\u3002\u6211\u89c9\u5f97\u6700\u8fd1\u5b83\u6ca1\u90a3\u4e48\u5e38\u89c1\u4e86\uff0c\u56e0\u4e3a\u5927\u5bb6\u88ab\u5751\u7684\u6b21\u6570\u592a\u591a\uff0c\u6240\u4ee5\u518d\u4e5f\u4e0d\u7528 :latest \uff0c\u5f00\u59cb\u52a0\u4e0a\u7248\u672c\u53f7\u4e86\u3002\u8fd9\u4e0b\u6e05\u9759\u4e86\uff01<\/p>\n
ECR \u6709\u4e00\u4e2a\u6807\u7b7e\u4e0d\u53d8\u6027\u7684\u5f3a\u5927\u529f\u80fd\uff0c\u7edd\u5bf9\u503c\u5f97\u4e00\u8bd5\u3002<\/p>\n
https:\/\/aws.amazon.com\/about-aws\/whats-new\/2019\/07\/amazon-ecr-now-supports-immutable-image-tags\/<\/p>\n
12.\u603b\u7ed3<\/strong><\/div>\n\u522b\u6307\u671b\u6240\u6709\u95ee\u9898\u90fd\u80fd\u81ea\u52a8\u89e3\u51b3\u2014\u2014Kubernetes \u4e0d\u662f\u94f6\u5f39\u3002\u5373\u4f7f\u662f\u5728 Kubernetes \u4e0a\uff0c\u4e00\u4e2a\u7cdf\u7cd5\u7684\u5e94\u7528\u7a0b\u5e8f\u8fd8\u4f1a\u662f\u4e00\u4e2a\u7cdf\u7cd5\u7684\u5e94\u7528\u7a0b\u5e8f\uff08\u5b9e\u9645\u4e0a\uff0c\u751a\u81f3\u8fd8\u53ef\u80fd\u66f4\u7cdf\u7cd5\uff09\u3002\u5982\u679c\u6211\u4eec\u4e0d\u591f\u5c0f\u5fc3\uff0c\u6700\u540e\u5c31\u4f1a\u9047\u5230\u4e00\u7cfb\u5217\u95ee\u9898\uff1a\u592a\u8fc7\u590d\u6742\u3001\u538b\u529b\u8fc7\u5927\u3001\u63a7\u5236\u5e73\u9762\u53d8\u6162\u3001\u6ca1\u6709\u707e\u96be\u6062\u590d\u7b56\u7565\u3002\u4e0d\u8981\u6307\u671b\u591a\u79df\u6237\u548c\u9ad8\u53ef\u7528\u6027\u662f\u5f00\u7bb1\u5373\u7528\u7684\u3002\u8bf7\u82b1\u70b9\u65f6\u95f4\u8ba9\u6211\u4eec\u7684\u5e94\u7528\u7a0b\u5e8f\u4e91\u539f\u751f\u5316\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
\u4f7f\u7528 Kubernetes\uff0c\u5927\u5bb6\u90fd\u4f1a\u9047\u5230\u54ea\u4e9b\u9519\u8bef\uff1f\u672c\u6587\u5206\u4eab\u4e86\u4f5c\u8005\u591a\u5e74\u6765\u4f7f\u7528 Kubernetes \u6700\u5e38\u89c1\u7684 1 […]<\/p>\n","protected":false},"author":1898,"featured_media":192765,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[562],"class_list":["post-192762","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread","tag-kubernetes"],"acf":[],"_links":{"self":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/192762","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/users\/1898"}],"replies":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/comments?post=192762"}],"version-history":[{"count":3,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/192762\/revisions"}],"predecessor-version":[{"id":192934,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/192762\/revisions\/192934"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media\/192765"}],"wp:attachment":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media?parent=192762"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/categories?post=192762"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/tags?post=192762"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}