{"id":1117,"date":"2023-11-22T17:57:11","date_gmt":"2023-11-22T09:57:11","guid":{"rendered":"https:\/\/www.fanyamin.com\/wordpress\/?p=1117"},"modified":"2023-11-22T17:58:05","modified_gmt":"2023-11-22T09:58:05","slug":"k8s-concepts","status":"publish","type":"post","link":"https:\/\/www.fanyamin.com\/wordpress\/?p=1117","title":{"rendered":"k8s concepts"},"content":{"rendered":"<ul>\n<li>\n<p>Pod\uff1a\u5728\u540c\u4e00\u4e3b\u673a\u4e0a\u4e00\u8d77\u90e8\u7f72\u7684\u4e00\u7ec4\u5bb9\u5668\u3002Pod \u662f\u8282\u70b9\u4e0a\u6700\u5c0f\u7684\u53ef\u90e8\u7f72\u5355\u5143\uff0c\u5b83\u63d0\u4f9b\u4e86\u4e00\u79cd\u6302\u8f7d\u5b58\u50a8\u3001\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\u4ee5\u53ca\u4f9b\u5176\u4ed6\u5bb9\u5668\u914d\u7f6e\u4fe1\u606f\u7684\u65b9\u6cd5\u3002\u5f53 Pod \u4e2d\u7684\u6240\u6709\u5bb9\u5668\u9000\u51fa\u65f6\uff0cPod \u4e5f\u4f1a\u6d88\u4ea1\u3002<\/p>\n<\/li>\n<li>\n<p>Service\uff1a\u5b9a\u4e49\u4e00\u7ec4\u903b\u8f91 Pod \u53ca\u5176\u8bbf\u95ee\u7b56\u7565\u7684\u62bd\u8c61\u3002<\/p>\n<\/li>\n<li>\n<p>Volume\uff1a\u53ef\u4f9b Pod \u4e2d\u8fd0\u884c\u7684\u5bb9\u5668\u8bbf\u95ee\u7684\u76ee\u5f55\u3002<\/p>\n<\/li>\n<\/ul>\n<p>Kubernetes \u67b6\u6784\u4f7f\u7528\u57fa\u7840\u8d44\u6e90\u4f5c\u4e3a\u4e00\u7ec4\u66f4\u9ad8\u7ea7\u8d44\u6e90\u7684\u57fa\u672c\u5c42\u3002\u9ad8\u7ea7\u8d44\u6e90\u5b9e\u73b0\u4e86\u5b9e\u9645\u751f\u4ea7\u4f7f\u7528\u573a\u666f\u6240\u9700\u7684\u529f\u80fd\uff0c\u8fd9\u4e9b\u529f\u80fd\u5229\u7528\/\u6269\u5c55\u4e86\u57fa\u7840\u8d44\u6e90\u7684\u529f\u80fd\u3002\u5728\u56fe 2.1 \u4e2d\uff0c\u4f60\u53ef\u4ee5\u770b\u5230 ReplicaSet \u8d44\u6e90\u63a7\u5236\u7740\u4e00\u4e2a\u6216\u591a\u4e2a Pod \u8d44\u6e90\u7684\u521b\u5efa\u3002\u5176\u4ed6\u7684\u4e00\u4e9b\u9ad8\u7ea7\u8d44\u6e90\u7684\u793a\u4f8b\u5305\u62ec\uff1a<\/p>\n<ul>\n<li>\n<p>ReplicaSet\uff1a\u5b9a\u4e49\u76f8\u540c\u914d\u7f6e Pod \u8fd0\u884c\u7684\u671f\u671b\u6570\u91cf\u3002\u5982\u679c ReplicaSet \u4e2d\u7684\u4e00\u4e2a Pod \u7ec8\u6b62\uff0c\u5219\u4f1a\u542f\u52a8\u4e00\u4e2a\u65b0\u7684 Pod\uff0c\u4ece\u800c\u5c06\u8fd0\u884c\u4e2d\u7684 Pod \u6570\u91cf\u6062\u590d\u5230\u671f\u671b\u6570\u91cf\u3002<\/p>\n<\/li>\n<li>\n<p>Deployment\uff1a\u4e3a Pod \u548c ReplicaSet \u8d4b\u4e88\u58f0\u660e\u5f0f\u66f4\u65b0\u7684\u80fd\u529b\u3002<\/p>\n<\/li>\n<li>\n<p>Job\uff1a\u521b\u5efa\u4e00\u4e2a\u6216\u591a\u4e2a\u8fd0\u884c\u5b8c\u5373\u505c\u6b62\u7684 Pod\u3002<\/p>\n<\/li>\n<li>\n<p>CronJob\uff1a\u57fa\u4e8e\u65f6\u95f4\u8ba1\u5212\u6765\u521b\u5efa Job\u3002<\/p>\n<\/li>\n<li>\n<p>Namespace\uff1a\u5927\u591a\u6570 Kubernetes \u8d44\u6e90\u90fd\u5c5e\u4e8e\u4e00\u4e2a\uff08\u5e76\u4e14\u53ea\u6709\u4e00\u4e2a\uff09\u547d\u540d\u7a7a\u95f4\u3002\u547d\u540d\u7a7a\u95f4\u5b9a\u4e49\u4e86\u540d\u79f0\u7684\u8303\u56f4\uff0c\u5176\u4e2d\u7279\u5b9a\u547d\u540d\u7a7a\u95f4\u4e2d\u7684\u8d44\u6e90\u547d\u540d\u5fc5\u987b\u552f\u4e00\u3002\u547d\u540d\u7a7a\u95f4\u8fd8\u63d0\u4f9b\u4e86\u4e00\u79cd\u901a\u8fc7\u57fa\u4e8e\u89d2\u8272\u7684\u8bbf\u95ee\u63a7\u5236\uff08RBAC\uff09\u3001\u7f51\u7edc\u7b56\u7565\u548c\u8d44\u6e90\u914d\u989d\u7b49\u5c06\u7528\u6237\u548c\u5e94\u7528\u7a0b\u5e8f\u76f8\u4e92\u9694\u79bb\u7684\u65b9\u6cd5\u3002\u8fd9\u4e9b\u63a7\u5236\u5141\u8bb8\u521b\u5efa\u4e00\u4e2a\u591a\u79df\u6237 Kubernetes \u96c6\u7fa4\uff0c\u5141\u8bb8\u591a\u4e2a\u7528\u6237\u5171\u4eab\u540c\u4e00\u4e2a\u96c6\u7fa4\u5e76\u907f\u514d\u76f8\u4e92\u5f71\u54cd\uff08\u4f8b\u5982\uff0c\u300c\u8fd1\u90bb\u5e72\u6270\u300d\u95ee\u9898\uff09\u3002<\/p>\n<\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/www.fanyamin.com\/wordpress\/wp-content\/uploads\/2023\/11\/image-1700647089121.png\" alt=\"file\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pod\uff1a\u5728\u540c\u4e00\u4e3b\u673a\u4e0a\u4e00\u8d77\u90e8\u7f72\u7684\u4e00\u7ec4\u5bb9\u5668\u3002Pod \u662f\u8282\u70b9\u4e0a\u6700\u5c0f\u7684\u53ef\u90e8\u7f72\u5355\u5143\uff0c\u5b83\u63d0\u4f9b\u4e86\u4e00\u79cd\u6302\u8f7d\u5b58\u50a8\u3001\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\u4ee5\u53ca\u4f9b\u5176\u4ed6\u5bb9\u5668\u914d\u7f6e\u4fe1\u606f\u7684\u65b9\u6cd5\u3002\u5f53 Pod \u4e2d\u7684\u6240\u6709\u5bb9\u5668\u9000\u51fa\u65f6\uff0cPod \u4e5f\u4f1a\u6d88\u4ea1\u3002 Service\uff1a\u5b9a\u4e49\u4e00\u7ec4\u903b\u8f91 Pod \u53ca\u5176\u8bbf\u95ee\u7b56\u7565\u7684\u62bd\u8c61\u3002 Volume\uff1a\u53ef\u4f9b Pod \u4e2d\u8fd0\u884c\u7684\u5bb9\u5668\u8bbf\u95ee\u7684\u76ee\u5f55\u3002 Kubernetes \u67b6\u6784\u4f7f\u7528\u57fa\u7840\u8d44\u6e90\u4f5c\u4e3a\u4e00\u7ec4\u66f4\u9ad8\u7ea7\u8d44\u6e90\u7684\u57fa\u672c\u5c42\u3002\u9ad8\u7ea7\u8d44\u6e90\u5b9e\u73b0\u4e86\u5b9e\u9645\u751f\u4ea7\u4f7f\u7528\u573a\u666f\u6240\u9700\u7684\u529f\u80fd\uff0c\u8fd9\u4e9b\u529f\u80fd\u5229\u7528\/\u6269\u5c55\u4e86\u57fa\u7840\u8d44\u6e90\u7684\u529f\u80fd\u3002\u5728\u56fe 2.1 \u4e2d\uff0c\u4f60\u53ef\u4ee5\u770b\u5230 ReplicaSet \u8d44\u6e90\u63a7\u5236\u7740\u4e00\u4e2a\u6216\u591a\u4e2a Pod \u8d44\u6e90\u7684\u521b\u5efa\u3002\u5176\u4ed6\u7684\u4e00\u4e9b\u9ad8\u7ea7\u8d44\u6e90\u7684\u793a\u4f8b\u5305\u62ec\uff1a ReplicaSet\uff1a\u5b9a\u4e49\u76f8\u540c\u914d\u7f6e Pod \u8fd0\u884c\u7684\u671f\u671b\u6570\u91cf\u3002\u5982\u679c ReplicaSet \u4e2d\u7684\u4e00\u4e2a Pod \u7ec8\u6b62\uff0c\u5219\u4f1a\u542f\u52a8\u4e00\u4e2a\u65b0\u7684 Pod\uff0c\u4ece\u800c\u5c06\u8fd0\u884c\u4e2d\u7684 Pod \u6570\u91cf\u6062\u590d\u5230\u671f\u671b\u6570\u91cf\u3002 Deployment\uff1a\u4e3a Pod \u548c ReplicaSet \u8d4b\u4e88\u58f0\u660e\u5f0f\u66f4\u65b0\u7684\u80fd\u529b\u3002 Job\uff1a\u521b\u5efa\u4e00\u4e2a\u6216\u591a\u4e2a\u8fd0\u884c\u5b8c\u5373\u505c\u6b62\u7684 Pod\u3002 CronJob\uff1a\u57fa\u4e8e\u65f6\u95f4\u8ba1\u5212\u6765\u521b\u5efa Job\u3002 Namespace\uff1a\u5927\u591a\u6570 Kubernetes \u8d44\u6e90\u90fd\u5c5e\u4e8e\u4e00\u4e2a\uff08\u5e76\u4e14\u53ea\u6709\u4e00\u4e2a\uff09\u547d\u540d\u7a7a\u95f4\u3002\u547d\u540d\u7a7a\u95f4\u5b9a\u4e49\u4e86\u540d\u79f0\u7684\u8303\u56f4\uff0c\u5176\u4e2d\u7279\u5b9a\u547d\u540d\u7a7a\u95f4\u4e2d\u7684\u8d44\u6e90\u547d\u540d\u5fc5\u987b\u552f\u4e00\u3002\u547d\u540d\u7a7a\u95f4\u8fd8\u63d0\u4f9b\u4e86\u4e00\u79cd\u901a\u8fc7\u57fa\u4e8e\u89d2\u8272\u7684\u8bbf\u95ee\u63a7\u5236\uff08RBAC\uff09\u3001\u7f51\u7edc\u7b56\u7565\u548c\u8d44\u6e90\u914d\u989d\u7b49\u5c06\u7528\u6237\u548c\u5e94\u7528\u7a0b\u5e8f\u76f8\u4e92\u9694\u79bb\u7684\u65b9\u6cd5\u3002\u8fd9\u4e9b\u63a7\u5236\u5141\u8bb8\u521b\u5efa\u4e00\u4e2a\u591a\u79df\u6237 Kubernetes \u96c6\u7fa4\uff0c\u5141\u8bb8\u591a\u4e2a\u7528\u6237\u5171\u4eab\u540c\u4e00\u4e2a\u96c6\u7fa4\u5e76\u907f\u514d\u76f8\u4e92\u5f71\u54cd\uff08\u4f8b\u5982\uff0c\u300c\u8fd1\u90bb\u5e72\u6270\u300d\u95ee\u9898\uff09\u3002 <a class=\"read-more\" href=\"https:\/\/www.fanyamin.com\/wordpress\/?p=1117\" title=\"Permanent Link to: k8s concepts\">&rarr;Read&nbsp;more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1117","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1117"}],"collection":[{"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1117"}],"version-history":[{"count":2,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1117\/revisions"}],"predecessor-version":[{"id":1120,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1117\/revisions\/1120"}],"wp:attachment":[{"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fanyamin.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}