{"id":77152,"date":"2026-02-24T02:50:31","date_gmt":"2026-02-23T18:50:31","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/77152.html"},"modified":"2026-02-24T02:50:31","modified_gmt":"2026-02-23T18:50:31","slug":"kubernetes-%e5%ae%8c%e5%85%a8%e6%8c%87%e5%8d%97%ef%bc%9a%e4%bb%8e%e9%9b%86%e7%be%a4%e6%9e%b6%e6%9e%84%e5%88%b0%e5%ba%94%e7%94%a8%e6%a8%a1%e5%9e%8b","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/77152.html","title":{"rendered":"Kubernetes \u5b8c\u5168\u6307\u5357\uff1a\u4ece\u96c6\u7fa4\u67b6\u6784\u5230\u5e94\u7528\u6a21\u578b"},"content":{"rendered":"<h2>Kubernetes \u5b8c\u5168\u6307\u5357&#xff1a;\u4ece\u96c6\u7fa4\u67b6\u6784\u5230\u5e94\u7528\u6a21\u578b<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260223185030-699ca1761d8c4.webp\" alt=\"\" \/><\/p>\n<\/p>\n<h4>\u6587\u7ae0\u76ee\u5f55<\/h4>\n<ul>\n<li>Kubernetes \u5b8c\u5168\u6307\u5357&#xff1a;\u4ece\u96c6\u7fa4\u67b6\u6784\u5230\u5e94\u7528\u6a21\u578b<\/li>\n<li>\n<ul>\n<li>\u4e00\u3001Kubernetes \u96c6\u7fa4\u67b6\u6784<\/li>\n<li>\n<ul>\n<li>1.1 \u63a7\u5236\u5e73\u9762\u7ec4\u4ef6<\/li>\n<li>\n<ul>\n<li>API Server&#xff08;kube-apiserver&#xff09;<\/li>\n<li>etcd<\/li>\n<li>Scheduler&#xff08;kube-scheduler&#xff09;<\/li>\n<li>Controller Manager&#xff08;kube-controller-manager&#xff09;<\/li>\n<li>Cloud Controller Manager&#xff08;cloud-controller-manager&#xff09;<\/li>\n<\/ul>\n<\/li>\n<li>1.2 \u5de5\u4f5c\u8282\u70b9\u7ec4\u4ef6<\/li>\n<li>\n<ul>\n<li>kubelet<\/li>\n<li>container runtime&#xff08;\u5bb9\u5668\u8fd0\u884c\u65f6&#xff09;<\/li>\n<li>kube-proxy<\/li>\n<li>Pod \u7f51\u7edc<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\u4e8c\u3001Kubernetes \u5e94\u7528\u6a21\u578b<\/li>\n<li>\n<ul>\n<li>2.1 \u6838\u5fc3\u6982\u5ff5&#xff1a;Pod<\/li>\n<li>2.2 \u5de5\u4f5c\u8d1f\u8f7d\u8d44\u6e90&#xff08;Workload Resources&#xff09;<\/li>\n<li>2.3 \u670d\u52a1\u53d1\u73b0\u4e0e\u8d1f\u8f7d\u5747\u8861<\/li>\n<li>2.4 \u914d\u7f6e\u7ba1\u7406<\/li>\n<li>2.5 \u5b58\u50a8\u7ba1\u7406<\/li>\n<li>2.6 \u547d\u540d\u7a7a\u95f4&#xff08;Namespace&#xff09;<\/li>\n<li>2.7 \u5e94\u7528\u6253\u5305\u4e0e\u90e8\u7f72\u5de5\u5177<\/li>\n<li>2.8 \u58f0\u660e\u5f0f API \u4e0e\u63a7\u5236\u5668\u6a21\u5f0f<\/li>\n<\/ul>\n<\/li>\n<li>\u4e09\u3001\u603b\u7ed3&#xff1a;Kubernetes \u5e94\u7528\u6a21\u578b\u4e0e\u67b6\u6784\u7684\u534f\u540c<\/li>\n<li>\u6269\u5c55\u5b66\u4e60\u8d44\u6e90<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p> Kubernetes&#xff08;\u5e38\u7b80\u79f0\u4e3a K8s&#xff09;\u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u5bb9\u5668\u7f16\u6392\u5e73\u53f0&#xff0c;\u7528\u4e8e\u81ea\u52a8\u5316\u90e8\u7f72\u3001\u6269\u7f29\u548c\u7ba1\u7406\u5bb9\u5668\u5316\u5e94\u7528\u3002\u5b83\u7684\u6838\u5fc3\u7406\u5ff5\u662f<br \/>\n\u58f0\u660e\u5f0f\u914d\u7f6e\u4e0e<br \/>\n\u81ea\u52a8\u5316\u8fd0\u7ef4&#xff1a;\u7528\u6237\u901a\u8fc7\u63cf\u8ff0\u671f\u671b\u7684\u6700\u7ec8\u72b6\u6001&#xff08;\u4f8b\u5982\u201c\u8fd0\u884c 3 \u4e2a nginx \u526f\u672c\u201d&#xff09;&#xff0c;\u7cfb\u7edf\u5219\u6301\u7eed\u534f\u8c03\u5b9e\u9645\u72b6\u6001\u4e0e\u4e4b\u5339\u914d\u3002\u8fd9\u79cd\u57fa\u4e8e\u63a7\u5236\u5668\u548c API \u7684\u8bbe\u8ba1&#xff0c;\u4f7f\u5f97 Kubernetes \u6210\u4e3a\u4e91\u539f\u751f\u65f6\u4ee3\u7684\u901a\u7528\u5e94\u7528\u5e95\u5ea7\u3002<\/p>\n<p>\u672c\u6587\u5c06\u5168\u9762\u4ecb\u7ecd Kubernetes \u7684\u4e24\u5927\u652f\u67f1&#xff1a;\u96c6\u7fa4\u67b6\u6784\u7ec4\u4ef6&#xff08;\u652f\u6491\u7cfb\u7edf\u7684\u7269\u7406\u4e0e\u903b\u8f91\u90e8\u4ef6&#xff09;\u4e0e\u5e94\u7528\u6a21\u578b&#xff08;\u7528\u4e8e\u5b9a\u4e49\u548c\u7ba1\u7406\u5e94\u7528\u7684 API \u5bf9\u8c61&#xff09;\u3002\u901a\u8fc7\u7406\u89e3\u5b83\u4eec\u5982\u4f55\u534f\u540c\u5de5\u4f5c&#xff0c;\u4f60\u5c06\u638c\u63e1 Kubernetes \u7684\u6838\u5fc3\u539f\u7406\u4e0e\u5b9e\u8df5\u65b9\u6cd5\u3002<\/p>\n<hr \/>\n<h3>\u4e00\u3001Kubernetes \u96c6\u7fa4\u67b6\u6784<\/h3>\n<p>\u4e00\u4e2a Kubernetes \u96c6\u7fa4\u7531**\u63a7\u5236\u5e73\u9762&#xff08;Control Plane&#xff09;\u548c\u5de5\u4f5c\u8282\u70b9&#xff08;Worker Nodes&#xff09;**\u6784\u6210\u3002\u63a7\u5236\u5e73\u9762\u8d1f\u8d23\u5168\u5c40\u51b3\u7b56\u4e0e\u72b6\u6001\u7ba1\u7406&#xff0c;\u5de5\u4f5c\u8282\u70b9\u8d1f\u8d23\u8fd0\u884c\u5b9e\u9645\u7684\u5bb9\u5668\u5316\u5e94\u7528\u3002<\/p>\n<p>\u67b6\u6784\u901f\u89c8&#xff1a;\u4f60\u53ef\u4ee5\u60f3\u8c61\u4e00\u4e2a\u5178\u578b\u7684\u96c6\u7fa4\u5305\u542b\u81f3\u5c11\u4e00\u4e2a\u63a7\u5236\u5e73\u9762\u8282\u70b9&#xff08;\u901a\u5e38\u4e3a3\u4e2a\u4ee5\u5b9e\u73b0\u9ad8\u53ef\u7528&#xff09;\u548c\u591a\u4e2a\u5de5\u4f5c\u8282\u70b9\u3002\u63a7\u5236\u5e73\u9762\u8282\u70b9\u4e0a\u8fd0\u884c\u7740API Server\u3001etcd\u3001Scheduler\u3001Controller Manager\u7b49\u7ec4\u4ef6&#xff1b;\u5de5\u4f5c\u8282\u70b9\u4e0a\u8fd0\u884c\u7740kubelet\u3001kube-proxy\u548c\u5bb9\u5668\u8fd0\u884c\u65f6\u3002\u6240\u6709\u7ec4\u4ef6\u901a\u8fc7API Server\u8fdb\u884c\u901a\u4fe1&#xff0c;\u5f62\u6210\u4e00\u4e2a\u6709\u673a\u6574\u4f53\u3002<\/p>\n<h4>1.1 \u63a7\u5236\u5e73\u9762\u7ec4\u4ef6<\/h4>\n<p>\u63a7\u5236\u5e73\u9762\u7ec4\u4ef6\u5bf9\u96c6\u7fa4\u505a\u51fa\u5168\u5c40\u51b3\u7b56&#xff0c;\u5e76\u5b58\u50a8\u6240\u6709\u72b6\u6001\u6570\u636e\u3002\u5b83\u4eec\u901a\u5e38\u90e8\u7f72\u5728\u4e13\u7528\u8282\u70b9\u4e0a\u4ee5\u4fdd\u8bc1\u7a33\u5b9a\u6027\u3002<\/p>\n<h5>API Server&#xff08;kube-apiserver&#xff09;<\/h5>\n<p>API Server \u662f\u6574\u4e2a\u96c6\u7fa4\u7684\u201c\u4ea4\u901a\u67a2\u7ebd\u201d&#xff0c;\u5b83\u66b4\u9732\u4e86 Kubernetes API&#xff0c;\u4f9b\u7528\u6237\u3001\u547d\u4ee4\u884c\u5de5\u5177&#xff08;\u5982 kubectl&#xff09;\u4ee5\u53ca\u5185\u90e8\u7ec4\u4ef6\u901a\u4fe1\u3002\u6240\u6709\u5bf9\u96c6\u7fa4\u7684\u64cd\u4f5c\u8bf7\u6c42\u90fd\u7ecf\u8fc7 API Server&#xff0c;\u5b83\u4f1a\u6267\u884c\u8ba4\u8bc1&#xff08;Authentication&#xff09;\u3001**\u6388\u6743&#xff08;Authorization&#xff09;\u548c\u51c6\u5165\u63a7\u5236&#xff08;Admission Control&#xff09;**\u4e09\u5c42\u5b89\u5168\u6821\u9a8c&#xff0c;\u7136\u540e\u5c06\u8d44\u6e90\u72b6\u6001\u6301\u4e45\u5316\u5230\u540e\u7aef\u5b58\u50a8\u4e2d\u3002API Server \u662f\u552f\u4e00\u76f4\u63a5\u4e0e etcd \u4ea4\u4e92\u7684\u7ec4\u4ef6\u3002<\/p>\n<h5>etcd<\/h5>\n<p>etcd \u662f\u4e00\u4e2a\u9ad8\u53ef\u7528\u3001\u5f3a\u4e00\u81f4\u6027\u7684\u5206\u5e03\u5f0f\u952e\u503c\u5b58\u50a8&#xff0c;\u4f5c\u4e3a Kubernetes \u7684\u540e\u7aef\u6570\u636e\u5e93\u3002\u5b83\u4fdd\u5b58\u4e86\u6240\u6709\u96c6\u7fa4\u6570\u636e&#xff0c;\u5305\u62ec Pod\u3001Service\u3001Deployment \u7b49\u8d44\u6e90\u7684\u5b9a\u4e49\u548c\u5f53\u524d\u72b6\u6001\u3002etcd \u901a\u5e38\u4ee5\u5947\u6570\u4e2a\u8282\u70b9\u96c6\u7fa4\u90e8\u7f72&#xff0c;\u5e76\u57fa\u4e8e Raft \u5171\u8bc6\u7b97\u6cd5\u786e\u4fdd\u6570\u636e\u4e00\u81f4\u6027&#xff08;\u4f8b\u5982&#xff0c;3\u8282\u70b9\u96c6\u7fa4\u53ef\u5bb9\u5fcd1\u8282\u70b9\u6545\u969c&#xff09;\u3002etcd \u88ab\u89c6\u4e3a\u96c6\u7fa4\u7684\u201c\u771f\u76f8\u6765\u6e90\u201d&#xff0c;\u5b9a\u671f\u5907\u4efd etcd \u6570\u636e\u662f\u707e\u96be\u6062\u590d\u7684\u5173\u952e\u3002<\/p>\n<h5>Scheduler&#xff08;kube-scheduler&#xff09;<\/h5>\n<p>Scheduler \u8d1f\u8d23\u76d1\u89c6\u65b0\u521b\u5efa\u7684\u3001\u5c1a\u672a\u5206\u914d\u5230\u8282\u70b9\u7684 Pod&#xff0c;\u5e76\u6839\u636e\u4e00\u7cfb\u5217\u7b56\u7565&#xff08;\u5982\u8d44\u6e90\u9700\u6c42\u3001\u8282\u70b9\u4eb2\u548c\u6027\u3001\u6c61\u70b9\u5bb9\u5fcd\u7b49&#xff09;\u9009\u62e9\u4e00\u4e2a\u6700\u5408\u9002\u7684\u8282\u70b9\u8fd0\u884c\u8be5 Pod\u3002\u8c03\u5ea6\u51b3\u7b56\u4f1a\u8003\u8651\u5355\u4e2a Pod \u548c\u96c6\u7fa4\u6574\u4f53\u7684\u8d44\u6e90\u72b6\u51b5\u3001\u786c\u4ef6\/\u8f6f\u4ef6\u7ea6\u675f\u4ee5\u53ca\u9ad8\u53ef\u7528\u8981\u6c42\u3002\u5e38\u89c1\u7684\u8c03\u5ea6\u7b56\u7565\u5305\u62ec&#xff1a;nodeSelector&#xff08;\u8282\u70b9\u6807\u7b7e\u9009\u62e9&#xff09;\u3001\u8282\u70b9\u4eb2\u548c\u6027\/\u53cd\u4eb2\u548c\u6027\u3001Pod \u4eb2\u548c\u6027\/\u53cd\u4eb2\u548c\u6027&#xff0c;\u4ee5\u53ca\u81ea\u5b9a\u4e49\u8c03\u5ea6\u5668\u6269\u5c55\u3002<\/p>\n<h5>Controller Manager&#xff08;kube-controller-manager&#xff09;<\/h5>\n<p>Controller Manager \u8fd0\u884c\u7740\u591a\u4e2a\u63a7\u5236\u5668\u8fdb\u7a0b&#xff0c;\u6bcf\u4e2a\u63a7\u5236\u5668\u901a\u8fc7 API Server \u76d1\u89c6\u96c6\u7fa4\u72b6\u6001&#xff0c;\u5e76\u52aa\u529b\u5c06\u5f53\u524d\u72b6\u6001\u8c03\u6574\u4e3a\u671f\u671b\u72b6\u6001\u3002\u8fd9\u4e9b\u63a7\u5236\u5668\u5e76\u53d1\u8fd0\u884c&#xff0c;\u5404\u81ea\u8d1f\u8d23\u4e0d\u540c\u7684\u8d44\u6e90\u7c7b\u578b\u3002\u5e38\u89c1\u7684\u5185\u7f6e\u63a7\u5236\u5668\u5305\u62ec&#xff1a;<\/p>\n<ul>\n<li>\u8282\u70b9\u63a7\u5236\u5668&#xff1a;\u76d1\u63a7\u8282\u70b9\u5065\u5eb7&#xff0c;\u5904\u7406\u8282\u70b9\u5b95\u673a\u65f6\u7684 Pod \u9a71\u9010\u3002<\/li>\n<li>\u526f\u672c\u63a7\u5236\u5668&#xff1a;\u786e\u4fdd\u6307\u5b9a\u6570\u91cf\u7684 Pod \u526f\u672c\u6b63\u5728\u8fd0\u884c&#xff08;Deployment \u7b49\u9ad8\u7ea7\u8d44\u6e90\u4f9d\u8d56\u6b64\u903b\u8f91&#xff09;\u3002<\/li>\n<li>\u7aef\u70b9\u63a7\u5236\u5668&#xff1a;\u7ef4\u62a4 Service \u4e0e Pod \u4e4b\u95f4\u7684\u7aef\u70b9&#xff08;Endpoints&#xff09;\u5bf9\u8c61\u3002<\/li>\n<li>Service \u8d26\u6237\u4e0e\u4ee4\u724c\u63a7\u5236\u5668&#xff1a;\u7ba1\u7406\u547d\u540d\u7a7a\u95f4\u4e2d\u7684\u9ed8\u8ba4\u8d26\u6237\u548c API \u8bbf\u95ee\u4ee4\u724c\u3002<\/li>\n<li>\u5176\u4ed6\u63a7\u5236\u5668&#xff08;\u5982 Namespace\u3001Job\u3001CronJob \u7b49&#xff09;\u3002 \u6240\u6709\u63a7\u5236\u5668\u88ab\u7f16\u8bd1\u6210\u5355\u4e2a\u4e8c\u8fdb\u5236\u6587\u4ef6\u5e76\u4f5c\u4e3a\u5355\u4e2a\u8fdb\u7a0b\u8fd0\u884c&#xff0c;\u4ee5\u964d\u4f4e\u590d\u6742\u6027\u3002<\/li>\n<\/ul>\n<h5>Cloud Controller Manager&#xff08;cloud-controller-manager&#xff09;<\/h5>\n<p>\u8fd9\u662f\u4e00\u4e2a\u53ef\u9009\u7ec4\u4ef6&#xff0c;\u7528\u4e8e\u5c06 Kubernetes \u4e0e\u7279\u5b9a\u4e91\u670d\u52a1\u5546&#xff08;\u5982 AWS\u3001GCP\u3001Azure&#xff09;\u7684 API \u96c6\u6210\u3002\u5b83\u8fd0\u884c\u4e91\u5e73\u53f0\u76f8\u5173\u7684\u63a7\u5236\u5668&#xff0c;\u4f8b\u5982&#xff1a;<\/p>\n<ul>\n<li>\u8282\u70b9\u63a7\u5236\u5668&#xff1a;\u68c0\u67e5\u4e91\u5e73\u53f0\u4ee5\u786e\u5b9a\u8282\u70b9\u662f\u5426\u5df2\u88ab\u5220\u9664\u3002<\/li>\n<li>\u8def\u7531\u63a7\u5236\u5668&#xff1a;\u5728\u4e91\u57fa\u7840\u8bbe\u65bd\u4e2d\u8bbe\u7f6e\u7f51\u7edc\u8def\u7531\u3002<\/li>\n<li>\u670d\u52a1\u63a7\u5236\u5668&#xff1a;\u521b\u5efa\u3001\u66f4\u65b0\u548c\u5220\u9664\u4e91\u8d1f\u8f7d\u5747\u8861\u5668&#xff08;\u5f53 Service \u7c7b\u578b\u4e3a LoadBalancer \u65f6&#xff09;\u3002 \u5f15\u5165 Cloud Controller Manager \u4f7f\u5f97\u6838\u5fc3 Kubernetes \u4ee3\u7801\u4e0e\u4e91\u5e73\u53f0\u903b\u8f91\u89e3\u8026&#xff0c;\u4fbf\u4e8e\u4e91\u539f\u751f\u6269\u5c55\u3002\u5728\u81ea\u5efa\u673a\u623f&#xff08;on-premise&#xff09;\u73af\u5883\u4e2d&#xff0c;\u901a\u5e38\u4e0d\u9700\u8981\u6b64\u7ec4\u4ef6\u3002<\/li>\n<\/ul>\n<h4>1.2 \u5de5\u4f5c\u8282\u70b9\u7ec4\u4ef6<\/h4>\n<p>\u5de5\u4f5c\u8282\u70b9\u662f\u8fd0\u884c\u5bb9\u5668\u5316\u5e94\u7528\u7684\u673a\u5668&#xff08;\u7269\u7406\u673a\u6216\u865a\u62df\u673a&#xff09;&#xff0c;\u6bcf\u4e2a\u8282\u70b9\u4e0a\u90fd\u8fd0\u884c\u7740\u5fc5\u8981\u7684\u4ee3\u7406\u670d\u52a1\u3002<\/p>\n<h5>kubelet<\/h5>\n<p>kubelet \u662f\u8fd0\u884c\u5728\u6bcf\u4e2a\u8282\u70b9\u4e0a\u7684\u4e3b\u8981\u4ee3\u7406&#xff0c;\u5b83\u8d1f\u8d23\u786e\u4fdd\u8282\u70b9\u4e0a\u7684\u5bb9\u5668\u6309\u7167 PodSpec&#xff08;Pod \u7684\u63cf\u8ff0&#xff09;\u8fd0\u884c\u3002kubelet \u4f1a\u76d1\u89c6 API Server \u4e0a\u5206\u914d\u7ed9\u672c\u8282\u70b9\u7684 Pod&#xff0c;\u5e76\u901a\u8fc7\u5bb9\u5668\u8fd0\u884c\u65f6\u63a5\u53e3&#xff08;CRI&#xff09;\u4e0e\u5e95\u5c42\u7684\u5bb9\u5668\u8fd0\u884c\u65f6\u4ea4\u4e92&#xff0c;\u4ee5\u542f\u52a8\u3001\u505c\u6b62\u5bb9\u5668&#xff0c;\u5e76\u5b9a\u671f\u4e0a\u62a5\u8282\u70b9\u548c Pod \u7684\u72b6\u6001\u7ed9\u63a7\u5236\u5e73\u9762\u3002\u5b83\u8fd8\u8d1f\u8d23\u6267\u884c\u5b58\u6d3b\u63a2\u9488&#xff08;livenessProbe&#xff09;\u548c\u5c31\u7eea\u63a2\u9488&#xff08;readinessProbe&#xff09;&#xff0c;\u4ee5\u5b9e\u73b0\u5e94\u7528\u5065\u5eb7\u68c0\u67e5\u548c\u6d41\u91cf\u5207\u6362\u3002<\/p>\n<h5>container runtime&#xff08;\u5bb9\u5668\u8fd0\u884c\u65f6&#xff09;<\/h5>\n<p>\u5bb9\u5668\u8fd0\u884c\u65f6\u662f\u5b9e\u9645\u8fd0\u884c\u5bb9\u5668\u7684\u8f6f\u4ef6&#xff0c;\u4f8b\u5982 Docker\u3001containerd\u3001CRI-O \u7b49\u3002Kubernetes \u901a\u8fc7 CRI \u4e0e\u5bb9\u5668\u8fd0\u884c\u65f6\u89e3\u8026&#xff0c;\u4f7f\u5f97\u96c6\u7fa4\u53ef\u4ee5\u652f\u6301\u591a\u79cd\u8fd0\u884c\u65f6\u3002kubelet \u901a\u8fc7 CRI \u8c03\u7528\u8fd0\u884c\u65f6\u6765\u521b\u5efa\u3001\u5220\u9664\u5bb9\u5668&#xff0c;\u5e76\u83b7\u53d6\u5bb9\u5668\u65e5\u5fd7\u548c\u8d44\u6e90\u7edf\u8ba1\u4fe1\u606f\u3002<\/p>\n<h5>kube-proxy<\/h5>\n<p>kube-proxy \u662f\u6bcf\u4e2a\u8282\u70b9\u4e0a\u7684\u7f51\u7edc\u4ee3\u7406&#xff0c;\u5b83\u8d1f\u8d23\u5b9e\u73b0 Service \u7684\u62bd\u8c61\u3002\u5b83\u7ef4\u62a4\u8282\u70b9\u4e0a\u7684\u7f51\u7edc\u89c4\u5219&#xff0c;\u5c06\u53d1\u5f80 Service \u7684\u6d41\u91cf&#xff08;\u901a\u8fc7 ClusterIP\u3001NodePort \u6216 LoadBalancer&#xff09;\u8d1f\u8f7d\u5747\u8861\u5230\u6b63\u786e\u7684\u540e\u7aef Pod\u3002kube-proxy \u652f\u6301\u4e09\u79cd\u5de5\u4f5c\u6a21\u5f0f&#xff1a;<\/p>\n<ul>\n<li>userspace&#xff1a;\u65e7\u6a21\u5f0f&#xff0c;\u6027\u80fd\u8f83\u4f4e&#xff0c;\u73b0\u5df2\u5f88\u5c11\u4f7f\u7528\u3002<\/li>\n<li>iptables&#xff1a;\u9ed8\u8ba4\u6a21\u5f0f&#xff0c;\u57fa\u4e8e Linux iptables \u5b9e\u73b0&#xff0c;\u6027\u80fd\u8f83\u597d&#xff0c;\u4f46\u89c4\u5219\u66f4\u65b0\u65f6\u5b58\u5728\u5ef6\u8fdf\u3002<\/li>\n<li>IPVS&#xff1a;\u66f4\u9ad8\u6548\u7684\u6a21\u5f0f&#xff0c;\u652f\u6301\u66f4\u590d\u6742\u7684\u8d1f\u8f7d\u5747\u8861\u7b97\u6cd5&#xff08;\u5982\u8f6e\u8be2\u3001\u6700\u5c11\u8fde\u63a5&#xff09;&#xff0c;\u9002\u5408\u5927\u89c4\u6a21\u96c6\u7fa4\u3002<\/li>\n<\/ul>\n<h5>Pod \u7f51\u7edc<\/h5>\n<p>\u867d\u7136\u4e0d\u662f\u72ec\u7acb\u7684\u7ec4\u4ef6&#xff0c;\u4f46\u6bcf\u4e2a\u8282\u70b9\u4e0a\u9700\u8981\u914d\u7f6e\u4e00\u4e2a\u96c6\u7fa4\u7f51\u7edc\u63d2\u4ef6&#xff08;\u5982 Calico\u3001Flannel\u3001Weave \u7b49&#xff09;&#xff0c;\u4ee5\u5b9e\u73b0\u8de8\u8282\u70b9\u7684 Pod \u95f4\u76f4\u63a5\u901a\u4fe1\u3002\u8fd9\u4e9b\u63d2\u4ef6\u9075\u5faa CNI&#xff08;Container Network Interface&#xff09; \u89c4\u8303&#xff0c;\u8d1f\u8d23\u4e3a\u6bcf\u4e2a Pod \u5206\u914d\u552f\u4e00 IP&#xff0c;\u5e76\u8bbe\u7f6e\u8def\u7531\u89c4\u5219&#xff0c;\u786e\u4fdd Pod \u4e4b\u95f4\u53ef\u4ee5\u65e0\u969c\u788d\u901a\u4fe1&#xff0c;\u4e14\u7b26\u5408 Kubernetes \u7684\u7f51\u7edc\u6a21\u578b\u8981\u6c42&#xff1a;\u6240\u6709 Pod \u53ef\u76f4\u63a5\u901a\u4fe1&#xff0c;\u65e0\u9700 NAT&#xff1b;\u8282\u70b9\u4e0e Pod \u4e4b\u95f4\u4e5f\u53ef\u76f4\u63a5\u901a\u4fe1&#xff1b;Pod \u770b\u5230\u7684\u81ea\u8eab IP \u4e0e\u5176\u4ed6 Pod \u770b\u5230\u7684 IP \u4e00\u81f4\u3002<\/p>\n<hr \/>\n<h3>\u4e8c\u3001Kubernetes \u5e94\u7528\u6a21\u578b<\/h3>\n<p>Kubernetes \u901a\u8fc7\u4e00\u7cfb\u5217 API \u5bf9\u8c61\u6765\u63cf\u8ff0\u5e94\u7528\u7684\u72b6\u6001&#xff0c;\u518d\u7531\u63a7\u5236\u5668\u4e0d\u65ad\u8c03\u6574\u5b9e\u9645\u72b6\u6001\u4ee5\u5339\u914d\u671f\u671b\u72b6\u6001\u3002\u4e0b\u9762\u4ece\u57fa\u7840\u5230\u9ad8\u7ea7&#xff0c;\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e9b\u5bf9\u8c61\u53ca\u5176\u7528\u6cd5\u3002<\/p>\n<h4>2.1 \u6838\u5fc3\u6982\u5ff5&#xff1a;Pod<\/h4>\n<p>Pod \u662f Kubernetes \u4e2d\u6700\u5c0f\u7684\u90e8\u7f72\u548c\u8c03\u5ea6\u5355\u5143&#xff0c;\u4ee3\u8868\u96c6\u7fa4\u4e2d\u8fd0\u884c\u7684\u4e00\u4e2a\u6216\u591a\u4e2a\u7d27\u5bc6\u76f8\u5173\u7684\u5bb9\u5668&#xff08;\u5982\u4e3b\u5e94\u7528\u548c\u8fb9\u8f66\u5bb9\u5668&#xff09;\u3002Pod \u5185\u7684\u5bb9\u5668\u5171\u4eab\u7f51\u7edc\u547d\u540d\u7a7a\u95f4&#xff08;\u76f8\u540c\u7684 IP \u548c\u7aef\u53e3\u7a7a\u95f4&#xff09;\u3001\u5b58\u50a8\u5377&#xff08;Volume&#xff09;\u4ee5\u53ca\u8d44\u6e90\u9650\u5236\u3002Pod \u662f\u77ed\u6682\u6613\u5931\u7684&#xff0c;\u5176\u751f\u547d\u5468\u671f\u4e0d\u4e0e\u4efb\u4f55\u6c38\u4e45\u5b58\u50a8\u7ed1\u5b9a&#xff0c;\u56e0\u6b64\u9700\u8981\u66f4\u9ad8\u7ea7\u522b\u7684\u63a7\u5236\u5668\u6765\u7ba1\u7406 Pod \u7684\u526f\u672c\u3001\u66f4\u65b0\u548c\u81ea\u6108\u3002<\/p>\n<p>Init \u5bb9\u5668\u662f Pod \u7684\u4e00\u79cd\u7279\u6b8a\u5bb9\u5668&#xff0c;\u5b83\u5728\u5e94\u7528\u5bb9\u5668\u542f\u52a8\u524d\u8fd0\u884c&#xff0c;\u7528\u4e8e\u5b8c\u6210\u521d\u59cb\u5316\u4efb\u52a1&#xff08;\u5982\u7b49\u5f85\u4f9d\u8d56\u670d\u52a1\u3001\u6570\u636e\u8fc1\u79fb&#xff09;\u3002Init \u5bb9\u5668\u6210\u529f\u9000\u51fa\u540e&#xff0c;\u624d\u4f1a\u542f\u52a8\u4e3b\u5bb9\u5668\u3002<\/p>\n<p>Pod \u7684\u5b9e\u9645\u8fd0\u884c\u4f9d\u8d56\u4e8e\u5de5\u4f5c\u8282\u70b9\u7684 kubelet \u548c\u5bb9\u5668\u8fd0\u884c\u65f6&#xff1a;kubelet \u901a\u8fc7 API Server \u83b7\u53d6\u5206\u914d\u5230\u672c\u8282\u70b9\u7684 Pod \u5b9a\u4e49&#xff0c;\u7136\u540e\u8c03\u7528\u5bb9\u5668\u8fd0\u884c\u65f6\u521b\u5efa\u5bb9\u5668&#xff0c;\u5e76\u6301\u7eed\u76d1\u63a7\u5176\u72b6\u6001\u3002<\/p>\n<p>\u793a\u4f8b&#xff1a;\u4e00\u4e2a\u7b80\u5355\u7684 nginx Pod YAML<\/p>\n<p><span class=\"token key atrule\">apiVersion<\/span><span class=\"token punctuation\">:<\/span> v1<br \/>\n<span class=\"token key atrule\">kind<\/span><span class=\"token punctuation\">:<\/span> Pod<br \/>\n<span class=\"token key atrule\">metadata<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">name<\/span><span class=\"token punctuation\">:<\/span> nginx<br \/>\n  <span class=\"token key atrule\">labels<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">app<\/span><span class=\"token punctuation\">:<\/span> nginx<br \/>\n<span class=\"token key atrule\">spec<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">containers<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token key atrule\">name<\/span><span class=\"token punctuation\">:<\/span> nginx<br \/>\n    <span class=\"token key atrule\">image<\/span><span class=\"token punctuation\">:<\/span> nginx<span class=\"token punctuation\">:<\/span><span class=\"token number\">1.21<\/span><br \/>\n    <span class=\"token key atrule\">ports<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token key atrule\">containerPort<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token number\">80<\/span><\/p>\n<h4>2.2 \u5de5\u4f5c\u8d1f\u8f7d\u8d44\u6e90&#xff08;Workload Resources&#xff09;<\/h4>\n<p>\u5de5\u4f5c\u8d1f\u8f7d\u8d44\u6e90\u8d1f\u8d23\u7ba1\u7406 Pod \u7684\u751f\u547d\u5468\u671f&#xff0c;\u5305\u62ec\u521b\u5efa\u3001\u6269\u7f29\u5bb9\u3001\u6eda\u52a8\u66f4\u65b0\u7b49\u3002\u5e38\u89c1\u7684\u63a7\u5236\u5668\u6709&#xff1a;<\/p>\n<ul>\n<li>\n<p>Deployment \u9002\u7528\u4e8e\u65e0\u72b6\u6001\u5e94\u7528&#xff0c;\u7ba1\u7406 Pod \u7684\u591a\u4e2a\u526f\u672c&#xff0c;\u652f\u6301\u6eda\u52a8\u66f4\u65b0\u548c\u56de\u6eda\u3002\u901a\u8fc7 spec.replicas \u6307\u5b9a\u526f\u672c\u6570&#xff0c;spec.strategy \u5b9a\u4e49\u66f4\u65b0\u7b56\u7565&#xff08;\u5982 RollingUpdate \u7684 maxSurge \u548c maxUnavailable \u63a7\u5236\u66f4\u65b0\u901f\u7387&#xff09;\u3002Deployment \u7531 Controller Manager \u4e2d\u7684 Deployment \u63a7\u5236\u5668\u9a71\u52a8\u3002<\/p>\n<p>\u793a\u4f8b Deployment<\/p>\n<p> <span class=\"token key atrule\">apiVersion<\/span><span class=\"token punctuation\">:<\/span> apps\/v1<br \/>\n<span class=\"token key atrule\">kind<\/span><span class=\"token punctuation\">:<\/span> Deployment<br \/>\n<span class=\"token key atrule\">metadata<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">name<\/span><span class=\"token punctuation\">:<\/span> nginx<span class=\"token punctuation\">&#8211;<\/span>deployment<br \/>\n<span class=\"token key atrule\">spec<\/span><span class=\"token punctuation\">:<\/span><br \/>\n  <span class=\"token key atrule\">replicas<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token number\">3<\/span><br \/>\n  <span class=\"token key atrule\">selector<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">matchLabels<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">app<\/span><span class=\"token punctuation\">:<\/span> nginx<br \/>\n  <span class=\"token key atrule\">template<\/span><span class=\"token punctuation\">:<\/span><br \/>\n    <span class=\"token key atrule\">metadata<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">labels<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token key atrule\">app<\/span><span class=\"token punctuation\">:<\/span> nginx<br \/>\n    <span class=\"token key atrule\">spec<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token key atrule\">containers<\/span><span class=\"token punctuation\">:<\/span><br \/>\n      <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token key atrule\">name<\/span><span class=\"token punctuation\">:<\/span> nginx<br \/>\n        <span class=\"token key atrule\">image<\/span><span class=\"token punctuation\">:<\/span> nginx<span class=\"token punctuation\">:<\/span><span class=\"token number\">1.21<\/span><br \/>\n        <span class=\"token key atrule\">ports<\/span><span class=\"token punctuation\">:<\/span><br \/>\n        <span class=\"token punctuation\">&#8211;<\/span> <span class=\"token key atrule\">containerPort<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token number\">80<\/span>\n <\/li>\n<li>\n<p>StatefulSet \u7528\u4e8e\u6709\u72b6\u6001\u5e94\u7528&#xff08;\u5982\u6570\u636e\u5e93&#xff09;&#xff0c;\u4e3a\u6bcf\u4e2a Pod \u63d0\u4f9b\u7a33\u5b9a\u7684\u7f51\u7edc\u6807\u8bc6&#xff08;\u5982 pod-name-0&#xff09;\u548c\u6301\u4e45\u5316\u5b58\u50a8\u3002Pod \u7684\u542f\u505c\u987a\u5e8f\u53d7\u63a7&#xff08;\u6309\u5e8f\u521b\u5efa\u3001\u5012\u5e8f\u5220\u9664&#xff09;&#xff0c;\u4e14\u5220\u9664\u540e PVC \u901a\u5e38\u4fdd\u7559&#xff0c;\u786e\u4fdd\u6570\u636e\u4e0d\u4e22\u5931\u3002StatefulSet \u901a\u5e38\u914d\u5408 Headless Service&#xff08;ClusterIP: None&#xff09;\u4f7f\u7528&#xff0c;\u4ee5\u4fbf\u76f4\u63a5\u901a\u8fc7 Pod \u540d\u79f0\u8bbf\u95ee\u3002<\/p>\n<\/li>\n<li>\n<p>DaemonSet \u786e\u4fdd\u6240\u6709&#xff08;\u6216\u90e8\u5206&#xff09;\u8282\u70b9\u4e0a\u8fd0\u884c\u4e00\u4e2a Pod \u7684\u526f\u672c&#xff0c;\u5e38\u7528\u4e8e\u65e5\u5fd7\u6536\u96c6&#xff08;\u5982 Fluentd&#xff09;\u3001\u76d1\u63a7\u4ee3\u7406&#xff08;\u5982 Prometheus Node Exporter&#xff09;\u7b49\u8282\u70b9\u7ea7\u7ec4\u4ef6\u3002DaemonSet \u63a7\u5236\u5668\u4f1a\u76d1\u89c6\u8282\u70b9\u52a0\u5165\/\u9000\u51fa&#xff0c;\u81ea\u52a8\u521b\u5efa\u6216\u5220\u9664\u5bf9\u5e94\u7684 Pod\u3002<\/p>\n<\/li>\n<li>\n<p>Job \u4e0e CronJob Job \u7528\u4e8e\u6267\u884c\u4e00\u6b21\u6027\u4efb\u52a1&#xff08;\u5982\u6279\u5904\u7406&#xff09;&#xff0c;\u786e\u4fdd Pod \u6210\u529f\u9000\u51fa\u3002CronJob \u5219\u5728\u6307\u5b9a\u65f6\u95f4\u8c03\u5ea6 Job&#xff0c;\u7c7b\u4f3c Linux \u7684 crontab\u3002<\/p>\n<\/li>\n<\/ul>\n<h4>2.3 \u670d\u52a1\u53d1\u73b0\u4e0e\u8d1f\u8f7d\u5747\u8861<\/h4>\n<p>\u5bb9\u5668\u5316\u5e94\u7528\u7684 IP \u662f\u52a8\u6001\u53d8\u5316\u7684&#xff0c;\u56e0\u6b64\u9700\u8981\u7a33\u5b9a\u7684\u8bbf\u95ee\u5165\u53e3&#xff1a;<\/p>\n<ul>\n<li>\n<p>Service \u4e3a\u4e00\u7ec4 Pod \u63d0\u4f9b\u56fa\u5b9a\u7684\u865a\u62df IP \u548c DNS \u540d\u79f0&#xff0c;\u901a\u8fc7\u6807\u7b7e\u9009\u62e9\u5668&#xff08;Label Selector&#xff09;\u5173\u8054\u76ee\u6807 Pod\u3002Service \u7c7b\u578b\u5305\u62ec&#xff1a;<\/p>\n<table>\n<tr>\u7c7b\u578b\u8bbf\u95ee\u8303\u56f4\u5178\u578b\u7528\u9014<\/tr>\n<tbody>\n<tr>\n<td>ClusterIP<\/td>\n<td>\u96c6\u7fa4\u5185\u90e8<\/td>\n<td>\u5185\u90e8\u670d\u52a1\u8c03\u7528<\/td>\n<\/tr>\n<tr>\n<td>NodePort<\/td>\n<td>\u96c6\u7fa4\u5916\u90e8\u901a\u8fc7\u8282\u70b9IP&#043;\u7aef\u53e3\u8bbf\u95ee<\/td>\n<td>\u5f00\u53d1\u8c03\u8bd5\u6216\u7b80\u5355\u5bf9\u5916\u66b4\u9732<\/td>\n<\/tr>\n<tr>\n<td>LoadBalancer<\/td>\n<td>\u5916\u90e8\u901a\u8fc7\u4e91\u8d1f\u8f7d\u5747\u8861\u5668\u8bbf\u95ee<\/td>\n<td>\u751f\u4ea7\u73af\u5883\u5bf9\u5916\u670d\u52a1<\/td>\n<\/tr>\n<tr>\n<td>ExternalName<\/td>\n<td>\u96c6\u7fa4\u5185\u90e8\u8bbf\u95ee\u5916\u90e8\u57df\u540d<\/td>\n<td>\u5c06\u5916\u90e8\u670d\u52a1\u6620\u5c04\u4e3a\u5185\u90e8\u670d\u52a1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Service \u7684\u7f51\u7edc\u89c4\u5219\u7531\u5404\u8282\u70b9\u7684 kube-proxy \u7ef4\u62a4&#xff0c;\u5b83\u5c06\u6d41\u91cf\u8d1f\u8f7d\u5747\u8861\u5230\u540e\u7aef Pod\u3002\u5728\u8f83\u5927\u89c4\u6a21\u96c6\u7fa4\u4e2d&#xff0c;Kubernetes v1.19&#043; \u5f15\u5165\u4e86 EndpointSlice&#xff0c;\u66ff\u4ee3\u4f20\u7edf\u7684 Endpoints \u5bf9\u8c61\u4ee5\u89e3\u51b3\u6027\u80fd\u74f6\u9888\u3002<\/p>\n<\/li>\n<li>\n<p>Ingress \u7ba1\u7406\u5916\u90e8 HTTP\/HTTPS \u6d41\u91cf&#xff0c;\u63d0\u4f9b\u57fa\u4e8e\u57df\u540d\u548c\u8def\u5f84\u7684\u8def\u7531\u3001TLS \u7ec8\u6b62\u3001\u865a\u62df\u4e3b\u673a\u7b49\u529f\u80fd\u3002Ingress \u672c\u8eab\u53ea\u662f\u4e00\u4e2a API \u5bf9\u8c61&#xff0c;\u9700\u8981\u914d\u5408 Ingress Controller&#xff08;\u5982 Nginx Ingress Controller\u3001Traefik&#xff09;\u624d\u80fd\u5b9e\u9645\u5de5\u4f5c\u3002Ingress Controller \u901a\u5e38\u4ee5 Deployment \u6216 DaemonSet \u5f62\u5f0f\u8fd0\u884c\u5728\u96c6\u7fa4\u4e2d&#xff0c;\u76d1\u542c Ingress \u8d44\u6e90\u5e76\u914d\u7f6e\u76f8\u5e94\u7684\u8d1f\u8f7d\u5747\u8861\u5668\u3002<\/p>\n<\/li>\n<\/ul>\n<h4>2.4 \u914d\u7f6e\u7ba1\u7406<\/h4>\n<p>\u5c06\u914d\u7f6e\u4e0e\u5bb9\u5668\u955c\u50cf\u89e3\u8026&#xff0c;\u4fbf\u4e8e\u5e94\u7528\u5728\u4e0d\u540c\u73af\u5883\u95f4\u8fc1\u79fb&#xff1a;<\/p>\n<ul>\n<li>\n<p>ConfigMap \u5b58\u50a8\u975e\u673a\u5bc6\u6027\u7684\u914d\u7f6e\u6570\u636e&#xff08;\u5982\u73af\u5883\u53d8\u91cf\u3001\u547d\u4ee4\u884c\u53c2\u6570\u3001\u914d\u7f6e\u6587\u4ef6&#xff09;\u3002Pod \u53ef\u901a\u8fc7\u73af\u5883\u53d8\u91cf\u6216\u6302\u8f7d Volume \u7684\u65b9\u5f0f\u4f7f\u7528 ConfigMap\u3002\u6ce8\u610f&#xff1a;ConfigMap \u52a8\u6001\u66f4\u65b0\u540e&#xff0c;Pod \u5185\u6302\u8f7d\u7684\u6587\u4ef6\u4e0d\u4f1a\u81ea\u52a8\u66f4\u65b0&#xff0c;\u9664\u975e Pod \u91cd\u542f\u6216\u5e94\u7528\u652f\u6301\u70ed\u52a0\u8f7d\u3002\u53ef\u4f7f\u7528 Reloader \u7b49\u5de5\u5177\u81ea\u52a8\u89e6\u53d1\u6eda\u52a8\u66f4\u65b0\u3002<\/p>\n<\/li>\n<li>\n<p>Secret \u5b58\u50a8\u654f\u611f\u4fe1\u606f&#xff08;\u5982\u5bc6\u7801\u3001OAuth \u4ee4\u724c\u3001SSH \u5bc6\u94a5&#xff09;&#xff0c;\u6570\u636e\u4ee5 Base64 \u7f16\u7801&#xff0c;\u5e76\u652f\u6301\u52a0\u5bc6\u5b58\u50a8&#xff08;\u5982\u96c6\u6210 KMS&#xff09;\u3002\u4f7f\u7528\u65b9\u5f0f\u4e0e ConfigMap \u7c7b\u4f3c&#xff0c;\u4f46 Secret \u5bf9\u6570\u636e\u6709\u66f4\u4e25\u683c\u7684\u5b89\u5168\u7ea6\u675f&#xff08;\u5982\u5185\u5b58\u4e2d\u4e0d\u6301\u4e45\u5316&#xff09;\u3002<\/p>\n<\/li>\n<\/ul>\n<h4>2.5 \u5b58\u50a8\u7ba1\u7406<\/h4>\n<p>\u5bb9\u5668\u672c\u8eab\u662f\u65e0\u72b6\u6001\u7684&#xff0c;\u6301\u4e45\u5316\u6570\u636e\u9700\u8981\u501f\u52a9\u5b58\u50a8\u5377&#xff1a;<\/p>\n<ul>\n<li>\n<p>Volume Pod \u5185\u53ef\u6302\u8f7d\u7684\u5b58\u50a8\u76ee\u5f55&#xff0c;\u751f\u547d\u5468\u671f\u4e0e Pod \u76f8\u540c\u3002\u652f\u6301\u591a\u79cd\u7c7b\u578b&#xff1a;emptyDir&#xff08;\u4e34\u65f6\u76ee\u5f55&#xff09;\u3001hostPath&#xff08;\u8282\u70b9\u76ee\u5f55&#xff09;\u3001\u4e91\u5b58\u50a8&#xff08;\u5982 AWSElasticBlockStore&#xff09;\u7b49\u3002<\/p>\n<\/li>\n<li>\n<p>PersistentVolume&#xff08;PV&#xff09;\u548c PersistentVolumeClaim&#xff08;PVC&#xff09; PV \u662f\u96c6\u7fa4\u7ba1\u7406\u5458\u63d0\u4f9b\u7684\u5b58\u50a8\u8d44\u6e90&#xff08;\u5982 NFS\u3001\u4e91\u76d8&#xff09;&#xff0c;PVC \u662f\u7528\u6237\u5bf9\u5b58\u50a8\u7684\u8bf7\u6c42\u3002PVC \u7ed1\u5b9a\u5230\u6ee1\u8db3\u8981\u6c42\u7684 PV&#xff0c;Pod \u901a\u8fc7 PVC \u6302\u8f7d\u5b58\u50a8\u3002\u8fd9\u79cd\u65b9\u5f0f\u5b9e\u73b0\u4e86\u5b58\u50a8\u4e0e\u5e94\u7528\u7684\u89e3\u8026\u3002PV \u7684\u4f9b\u7ed9\u65b9\u5f0f\u5206\u4e3a\u9759\u6001\u4f9b\u7ed9&#xff08;\u7ba1\u7406\u5458\u9884\u5148\u521b\u5efa PV&#xff09;\u548c\u52a8\u6001\u4f9b\u7ed9&#xff08;\u901a\u8fc7 StorageClass \u81ea\u52a8\u521b\u5efa&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>StorageClass \u5b9a\u4e49\u52a8\u6001\u5b58\u50a8\u4f9b\u7ed9\u7684\u7c7b\u522b&#xff08;\u5982\u201c\u5feb\u901f SSD\u201d\u6216\u201c\u6162\u901f HDD\u201d&#xff09;&#xff0c;PVC \u53ef\u6307\u5b9a StorageClass&#xff0c;\u7531 Provisioner&#xff08;\u901a\u5e38\u7531 Cloud Controller Manager \u6216\u7b2c\u4e09\u65b9\u9a71\u52a8\u5b9e\u73b0&#xff09;\u81ea\u52a8\u521b\u5efa PV\u3002StorageClass \u5305\u542b\u53c2\u6570\u5982 provisioner\u3001reclaimPolicy\u3001allowVolumeExpansion \u7b49\u3002<\/p>\n<\/li>\n<\/ul>\n<h4>2.6 \u547d\u540d\u7a7a\u95f4&#xff08;Namespace&#xff09;<\/h4>\n<p>\u547d\u540d\u7a7a\u95f4\u63d0\u4f9b\u591a\u79df\u6237\u9694\u79bb&#xff0c;\u5c06\u96c6\u7fa4\u5185\u7684\u8d44\u6e90\u5212\u5206\u4e3a\u591a\u4e2a\u865a\u62df\u96c6\u7fa4\u3002\u540c\u4e00\u547d\u540d\u7a7a\u95f4\u5185\u7684\u8d44\u6e90\u540d\u79f0\u5fc5\u987b\u552f\u4e00&#xff0c;\u4e0d\u540c\u547d\u540d\u7a7a\u95f4\u95f4\u53ef\u91cd\u540d\u3002\u5e38\u7528\u4e8e\u533a\u5206\u73af\u5883&#xff08;\u5982 dev\u3001prod&#xff09;\u6216\u56e2\u961f\u3002RBAC&#xff08;\u57fa\u4e8e\u89d2\u8272\u7684\u8bbf\u95ee\u63a7\u5236&#xff09;\u53ef\u57fa\u4e8e\u547d\u540d\u7a7a\u95f4\u8fdb\u884c\u6388\u6743\u3002<\/p>\n<h4>2.7 \u5e94\u7528\u6253\u5305\u4e0e\u90e8\u7f72\u5de5\u5177<\/h4>\n<p>\u539f\u751f\u7684 YAML \u6587\u4ef6\u7ba1\u7406\u590d\u6742&#xff0c;\u793e\u533a\u5f00\u53d1\u4e86\u591a\u79cd\u5de5\u5177\u6765\u7b80\u5316\u5e94\u7528\u7684\u5b9a\u4e49\u3001\u5206\u53d1\u548c\u90e8\u7f72&#xff1a;<\/p>\n<ul>\n<li>\n<p>Helm Kubernetes \u7684\u5305\u7ba1\u7406\u5668&#xff0c;\u901a\u8fc7 Chart&#xff08;\u6a21\u677f\u5316\u7684 YAML \u96c6\u5408&#xff09;\u5b9a\u4e49\u5e94\u7528\u3002Chart \u53ef\u7248\u672c\u5316\u3001\u4f9d\u8d56\u7ba1\u7406&#xff0c;\u5e76\u652f\u6301\u901a\u8fc7 values.yaml \u8986\u76d6\u914d\u7f6e\u3002Helm \u5c06 Chart \u6e32\u67d3\u4e3a\u6700\u7ec8 YAML \u5e76\u5b89\u88c5\u5230\u96c6\u7fa4\u3002\u9002\u5408\u590d\u6742\u5e94\u7528\u7684\u6253\u5305\u548c\u5206\u53d1\u3002<\/p>\n<\/li>\n<li>\n<p>Kustomize \u539f\u751f\u96c6\u6210\u5728 kubectl \u4e2d&#xff0c;\u901a\u8fc7 kustomization.yaml \u5bf9\u57fa\u7840 YAML \u8fdb\u884c\u8986\u76d6\u3001\u8865\u4e01\u548c\u53d8\u6362&#xff0c;\u5b9e\u73b0\u73af\u5883\u5dee\u5f02\u5316\u914d\u7f6e&#xff0c;\u800c\u4e0d\u4f7f\u7528\u6a21\u677f\u3002\u9002\u5408\u7ba1\u7406\u73af\u5883\u7279\u5b9a\u914d\u7f6e&#xff08;\u5982\u5f00\u53d1\u3001\u751f\u4ea7&#xff09;\u3002<\/p>\n<\/li>\n<li>\n<p>Operator \u57fa\u4e8e\u81ea\u5b9a\u4e49\u8d44\u6e90&#xff08;CRD&#xff09;\u548c\u81ea\u5b9a\u4e49\u63a7\u5236\u5668&#xff0c;\u5c06\u8fd0\u7ef4\u77e5\u8bc6\u7f16\u7801\u6210\u8f6f\u4ef6\u3002Operator \u80fd\u591f\u81ea\u52a8\u5904\u7406\u5e94\u7528\u7684\u90e8\u7f72\u3001\u5907\u4efd\u3001\u6545\u969c\u8f6c\u79fb\u7b49\u590d\u6742\u64cd\u4f5c&#xff08;\u5982 etcd-operator\u3001Prometheus-operator&#xff09;\u3002\u5f00\u53d1\u8005\u53ef\u4ee5\u4f7f\u7528 kubebuilder \u6216 operator-sdk \u5feb\u901f\u6784\u5efa Operator\u3002<\/p>\n<\/li>\n<\/ul>\n<h4>2.8 \u58f0\u660e\u5f0f API \u4e0e\u63a7\u5236\u5668\u6a21\u5f0f<\/h4>\n<p>\u8fd9\u662f Kubernetes \u5e94\u7528\u6a21\u578b\u7684\u7075\u9b42&#xff1a;<\/p>\n<ul>\n<li>\u58f0\u660e\u5f0f API&#xff1a;\u7528\u6237\u901a\u8fc7 YAML\/JSON \u63cf\u8ff0\u671f\u671b\u7684\u6700\u7ec8\u72b6\u6001&#xff08;\u5982\u201c\u8fd0\u884c 3 \u4e2a nginx \u526f\u672c\u201d&#xff09;&#xff0c;\u800c\u975e\u6267\u884c\u4e00\u7cfb\u5217\u547d\u4ee4\u3002\u7cfb\u7edf\u6301\u7eed\u786e\u4fdd\u5b9e\u9645\u72b6\u6001\u4e0e\u671f\u671b\u72b6\u6001\u4e00\u81f4\u3002<\/li>\n<li>\u63a7\u5236\u5668\u6a21\u5f0f&#xff1a;\u6bcf\u4e2a\u5de5\u4f5c\u8d1f\u8f7d\u8d44\u6e90\u5bf9\u5e94\u4e00\u4e2a\u63a7\u5236\u5668&#xff08;\u5982 Deployment \u63a7\u5236\u5668&#xff09;&#xff0c;\u63a7\u5236\u5668\u901a\u8fc7\u8c03\u8c10\u5faa\u73af&#xff08;Reconcile Loop&#xff09;\u76d1\u63a7\u8d44\u6e90\u53d8\u5316&#xff0c;\u5e76\u8c03\u7528\u5e95\u5c42 API&#xff08;\u5982\u521b\u5efa\u6216\u5220\u9664 Pod&#xff09;\u6765\u8fbe\u5230\u671f\u671b\u72b6\u6001\u3002\u8fd9\u4e9b\u63a7\u5236\u5668\u8fd0\u884c\u5728 Controller Manager \u4e2d&#xff0c;\u800c API Server \u5219\u4f5c\u4e3a\u6240\u6709\u4ea4\u4e92\u7684\u4e2d\u4ecb\u3002<\/li>\n<\/ul>\n<p>\u6d41\u7a0b\u793a\u610f\u56fe&#xff1a;\u7528\u6237 kubectl apply -f deployment.yaml \u2192 API Server \u5c06 Deployment \u5b58\u50a8\u5230 etcd \u2192 Deployment \u63a7\u5236\u5668\u76d1\u542c\u5230\u65b0\u8d44\u6e90 \u2192 \u63a7\u5236\u5668\u6839\u636e\u671f\u671b\u526f\u672c\u6570\u521b\u5efa Pod \u5bf9\u8c61 \u2192 Scheduler \u76d1\u542c\u5230\u672a\u8c03\u5ea6\u7684 Pod \u2192 \u9009\u62e9\u5408\u9002\u7684\u8282\u70b9\u5e76\u66f4\u65b0 Pod \u7684 nodeName \u2192 \u8be5\u8282\u70b9\u4e0a\u7684 kubelet \u76d1\u542c\u5230\u5206\u914d\u7ed9\u672c\u8282\u70b9\u7684 Pod \u2192 \u8c03\u7528\u5bb9\u5668\u8fd0\u884c\u65f6\u521b\u5efa\u5bb9\u5668\u3002<\/p>\n<p>\u8fd9\u79cd\u6a21\u578b\u6781\u5927\u5730\u63d0\u5347\u4e86\u7cfb\u7edf\u7684\u81ea\u6108\u80fd\u529b\u548c\u53ef\u6269\u5c55\u6027&#xff1a;\u5f53 Pod \u610f\u5916\u7ec8\u6b62\u65f6&#xff0c;\u63a7\u5236\u5668\u4f1a\u81ea\u52a8\u91cd\u5efa&#xff1b;\u5f53\u8282\u70b9\u6545\u969c\u65f6&#xff0c;Pod \u4f1a\u88ab\u91cd\u65b0\u8c03\u5ea6\u5230\u5065\u5eb7\u8282\u70b9\u3002<\/p>\n<hr \/>\n<h3>\u4e09\u3001\u603b\u7ed3&#xff1a;Kubernetes \u5e94\u7528\u6a21\u578b\u4e0e\u67b6\u6784\u7684\u534f\u540c<\/h3>\n<p>Kubernetes \u7684\u5f3a\u5927\u4e4b\u5904\u5728\u4e8e\u5176\u6e05\u6670\u7684\u67b6\u6784\u5206\u5c42\u4e0e\u58f0\u660e\u5f0f\u8bbe\u8ba1\u7684\u5b8c\u7f8e\u7ed3\u5408&#xff1a;<\/p>\n<ul>\n<li>\u63a7\u5236\u5e73\u9762&#xff08;API Server\u3001etcd\u3001Scheduler\u3001Controller Manager\u3001Cloud Controller Manager&#xff09;\u63d0\u4f9b\u4e86\u5168\u5c40\u534f\u8c03\u4e0e\u72b6\u6001\u5b58\u50a8\u7684\u57fa\u77f3\u3002<\/li>\n<li>\u5de5\u4f5c\u8282\u70b9&#xff08;kubelet\u3001\u5bb9\u5668\u8fd0\u884c\u65f6\u3001kube-proxy\u3001\u7f51\u7edc\u63d2\u4ef6&#xff09;\u5219\u8d1f\u8d23\u5b9e\u9645\u6267\u884c\u4efb\u52a1\u5e76\u7ef4\u6301\u7f51\u7edc\u8fde\u901a\u6027\u3002<\/li>\n<li>\u5e94\u7528\u6a21\u578b&#xff08;Pod\u3001\u5de5\u4f5c\u8d1f\u8f7d\u8d44\u6e90\u3001Service\u3001ConfigMap\u3001PV\/PVC \u7b49&#xff09;\u4e3a\u7528\u6237\u63d0\u4f9b\u4e86\u6807\u51c6\u5316\u7684\u63a5\u53e3&#xff0c;\u4f7f\u5f97\u590d\u6742\u7684\u5206\u5e03\u5f0f\u5e94\u7528\u53ef\u4ee5\u50cf\u63cf\u8ff0\u671f\u671b\u72b6\u6001\u4e00\u6837\u8f7b\u677e\u90e8\u7f72\u548c\u7ba1\u7406\u3002<\/li>\n<\/ul>\n<p>\u901a\u8fc7\u8fd9\u79cd\u8bbe\u8ba1&#xff0c;Kubernetes \u5b9e\u73b0\u4e86&#xff1a;<\/p>\n<ul>\n<li>\u57fa\u7840\u8bbe\u65bd\u62bd\u8c61&#xff1a;\u9690\u85cf\u5e95\u5c42 IaaS \u5dee\u5f02&#xff0c;\u5e94\u7528\u53ef\u79fb\u690d\u3002<\/li>\n<li>\u81ea\u52a8\u5316\u8fd0\u7ef4&#xff1a;\u81ea\u6108\u3001\u5f39\u6027\u4f38\u7f29\u3001\u6eda\u52a8\u66f4\u65b0\u3001\u56de\u6eda\u3002<\/li>\n<li>\u6a21\u5757\u5316\u4e0e\u7ec4\u5408&#xff1a;\u5404\u79cd API \u5bf9\u8c61\u53ef\u81ea\u7531\u7ec4\u5408&#xff0c;\u6ee1\u8db3\u590d\u6742\u5e94\u7528\u9700\u6c42\u3002<\/li>\n<li>\u53ef\u6269\u5c55\u6027&#xff1a;\u901a\u8fc7 CRD \u548c Operator \u6269\u5c55\u5e73\u53f0\u529f\u80fd&#xff0c;\u9002\u5e94\u5404\u7c7b\u6709\u72b6\u6001\u5e94\u7528\u3002<\/li>\n<li>\u58f0\u660e\u5f0f\u914d\u7f6e&#xff1a;\u4fbf\u4e8e\u7248\u672c\u63a7\u5236\u3001\u5ba1\u8ba1\u548c\u81ea\u52a8\u5316\u4ea4\u4ed8&#xff08;GitOps&#xff09;\u3002<\/li>\n<\/ul>\n<p>\u7406\u89e3 Kubernetes \u7684\u67b6\u6784\u7ec4\u4ef6\u4e0e\u5e94\u7528\u6a21\u578b&#xff0c;\u5c31\u5982\u540c\u638c\u63e1\u4e86\u8fd9\u4e2a\u4e91\u539f\u751f\u64cd\u4f5c\u7cfb\u7edf\u7684\u5185\u90e8\u539f\u7406\u4e0e\u7528\u6237\u63a5\u53e3&#xff0c;\u8ba9\u4f60\u80fd\u591f\u66f4\u9ad8\u6548\u5730\u6784\u5efa\u3001\u90e8\u7f72\u548c\u7ba1\u7406\u73b0\u4ee3\u5316\u7684\u5bb9\u5668\u5316\u5e94\u7528\u3002<\/p>\n<hr \/>\n<h3>\u6269\u5c55\u5b66\u4e60\u8d44\u6e90<\/h3>\n<ul>\n<li>\u5b98\u65b9\u6587\u6863&#xff1a;https:\/\/kubernetes.io\/docs\/ &#xff08;\u6700\u6743\u5a01\u7684\u8d44\u6599&#xff09;<\/li>\n<li>Kubernetes The Hard Way&#xff1a;https:\/\/github.com\/kelseyhightower\/kubernetes-the-hard-way &#xff08;\u624b\u628a\u624b\u642d\u5efa\u96c6\u7fa4&#xff0c;\u6df1\u5165\u7406\u89e3\u539f\u7406&#xff09;<\/li>\n<li>\u8ba4\u8bc1\u8003\u8bd5&#xff1a;CKA&#xff08;Certified Kubernetes Administrator&#xff09;\u548c CKAD&#xff08;Certified Kubernetes Application Developer&#xff09;\u662f\u68c0\u9a8c\u80fd\u529b\u7684\u6743\u5a01\u8ba4\u8bc1\u3002<\/li>\n<li>\u793e\u533a\u5de5\u5177&#xff1a;\u63a8\u8350\u5c1d\u8bd5 kind&#xff08;\u672c\u5730\u5feb\u901f\u96c6\u7fa4&#xff09;\u3001kubectx\/kubens&#xff08;\u5feb\u901f\u5207\u6362\u4e0a\u4e0b\u6587\/\u547d\u540d\u7a7a\u95f4&#xff09;\u3001k9s&#xff08;\u7ec8\u7aef UI \u7ba1\u7406&#xff09;\u3002<\/li>\n<\/ul>\n<p>\u5e0c\u671b\u672c\u6587\u80fd\u5e2e\u52a9\u4f60\u592f\u5b9e Kubernetes \u57fa\u7840&#xff0c;\u5728\u5b9e\u9645\u5de5\u4f5c\u4e2d\u5f97\u5fc3\u5e94\u624b\u3002\u5982\u6709\u7591\u95ee\u6216\u5efa\u8bae&#xff0c;\u6b22\u8fce\u4ea4\u6d41\u8ba8\u8bba&#xff01;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Kubernetes \u5b8c\u5168\u6307\u5357&#xff1a;\u4ece\u96c6\u7fa4\u67b6\u6784\u5230\u5e94\u7528\u6a21\u578b \u6587\u7ae0\u76ee\u5f55Kubernetes \u5b8c\u5168\u6307\u5357&#xff1a;\u4ece\u96c6\u7fa4\u67b6\u6784\u5230\u5e94\u7528\u6a21\u578b\u4e00\u3001Kubernetes \u96c6\u7fa4\u67b6\u67841.1 \u63a7\u5236\u5e73\u9762\u7ec4\u4ef6API Server&#xff08;kube-apiserver&#xff09;etcdScheduler&#xff08;kube-scheduler&#xff09;Controller Manager&#xff08;kube-controller-manager&#xff09;Cl<\/p>\n","protected":false},"author":2,"featured_media":77151,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[120,121,188],"topic":[],"class_list":["post-77152","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-kubernetes","tag-121","tag-188"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Kubernetes \u5b8c\u5168\u6307\u5357\uff1a\u4ece\u96c6\u7fa4\u67b6\u6784\u5230\u5e94\u7528\u6a21\u578b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/77152.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Kubernetes \u5b8c\u5168\u6307\u5357\uff1a\u4ece\u96c6\u7fa4\u67b6\u6784\u5230\u5e94\u7528\u6a21\u578b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"Kubernetes \u5b8c\u5168\u6307\u5357&#xff1a;\u4ece\u96c6\u7fa4\u67b6\u6784\u5230\u5e94\u7528\u6a21\u578b \u6587\u7ae0\u76ee\u5f55Kubernetes \u5b8c\u5168\u6307\u5357&#xff1a;\u4ece\u96c6\u7fa4\u67b6\u6784\u5230\u5e94\u7528\u6a21\u578b\u4e00\u3001Kubernetes \u96c6\u7fa4\u67b6\u67841.1 \u63a7\u5236\u5e73\u9762\u7ec4\u4ef6API Server&#xff08;kube-apiserver&#xff09;etcdScheduler&#xff08;kube-scheduler&#xff09;Controller Manager&#xff08;kube-controller-manager&#xff09;Cl\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/77152.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-02-23T18:50:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260223185030-699ca1761d8c4.webp\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/77152.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/77152.html\",\"name\":\"Kubernetes \u5b8c\u5168\u6307\u5357\uff1a\u4ece\u96c6\u7fa4\u67b6\u6784\u5230\u5e94\u7528\u6a21\u578b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-02-23T18:50:31+00:00\",\"dateModified\":\"2026-02-23T18:50:31+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/77152.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/77152.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/77152.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Kubernetes \u5b8c\u5168\u6307\u5357\uff1a\u4ece\u96c6\u7fa4\u67b6\u6784\u5230\u5e94\u7528\u6a21\u578b\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Kubernetes \u5b8c\u5168\u6307\u5357\uff1a\u4ece\u96c6\u7fa4\u67b6\u6784\u5230\u5e94\u7528\u6a21\u578b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/77152.html","og_locale":"zh_CN","og_type":"article","og_title":"Kubernetes \u5b8c\u5168\u6307\u5357\uff1a\u4ece\u96c6\u7fa4\u67b6\u6784\u5230\u5e94\u7528\u6a21\u578b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"Kubernetes \u5b8c\u5168\u6307\u5357&#xff1a;\u4ece\u96c6\u7fa4\u67b6\u6784\u5230\u5e94\u7528\u6a21\u578b \u6587\u7ae0\u76ee\u5f55Kubernetes \u5b8c\u5168\u6307\u5357&#xff1a;\u4ece\u96c6\u7fa4\u67b6\u6784\u5230\u5e94\u7528\u6a21\u578b\u4e00\u3001Kubernetes \u96c6\u7fa4\u67b6\u67841.1 \u63a7\u5236\u5e73\u9762\u7ec4\u4ef6API Server&#xff08;kube-apiserver&#xff09;etcdScheduler&#xff08;kube-scheduler&#xff09;Controller Manager&#xff08;kube-controller-manager&#xff09;Cl","og_url":"https:\/\/www.wsisp.com\/helps\/77152.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-02-23T18:50:31+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/02\/20260223185030-699ca1761d8c4.webp"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/77152.html","url":"https:\/\/www.wsisp.com\/helps\/77152.html","name":"Kubernetes \u5b8c\u5168\u6307\u5357\uff1a\u4ece\u96c6\u7fa4\u67b6\u6784\u5230\u5e94\u7528\u6a21\u578b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-02-23T18:50:31+00:00","dateModified":"2026-02-23T18:50:31+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/77152.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/77152.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/77152.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Kubernetes \u5b8c\u5168\u6307\u5357\uff1a\u4ece\u96c6\u7fa4\u67b6\u6784\u5230\u5e94\u7528\u6a21\u578b"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/77152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=77152"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/77152\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/77151"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=77152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=77152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=77152"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=77152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}