{"id":35468,"date":"2025-12-21T04:37:17","date_gmt":"2025-12-20T20:37:17","guid":{"rendered":"https:\/\/bdsmq.com\/?p=35468"},"modified":"2025-12-21T04:37:17","modified_gmt":"2025-12-20T20:37:17","slug":"k8%e5%88%b0%e5%ba%95%e6%98%af%e4%bb%80%e4%b9%88%ef%bc%9f%e6%8f%ad%e5%bc%80%e4%bd%a0%e6%89%80%e4%b8%8d%e7%9f%a5%e9%81%93%e7%9a%84%e7%a5%9e%e7%a7%98%e9%9d%a2%e7%ba%b1","status":"publish","type":"post","link":"https:\/\/bdsmq.com\/?p=35468","title":{"rendered":"k8\u5230\u5e95\u662f\u4ec0\u4e48\uff1f\u63ed\u5f00\u4f60\u6240\u4e0d\u77e5\u9053\u7684\u795e\u79d8\u9762\u7eb1"},"content":{"rendered":"<p><!-- AI-GLOBAL-START --><\/p>\n<div class=\"custom-insert-global\" data-charset=\"utf8\">\n<p style=\"font-style: italic;font-weight: bold;font-size: 0;white-space: nowrap;margin: 0;padding: 0\">\n  <span style=\"vertical-align: middle;font-size: 24px;color: #555555\">  \u65b0\u4eba\u5165\u5708  <\/span>  <span style=\"vertical-align: middle;font-size: 24px\"> \ud83d\udc49  <\/span>  <a href=\"https:\/\/work.weixin.qq.com\/ca\/cawcdedbb35988d0f8\" target=\"_blank\" style=\"text-decoration: none;vertical-align: middle;font-size: 24px;color: #ff0000;font-style: italic;font-weight: bold\"> \u70b9\u51fb\u8fd9\u91cc  <\/a> <span style=\"vertical-align: middle;font-size: 24px\"> \ud83d\udc48  <\/span><\/p>\n<p style=\"font-style: italic;font-size: 24px;white-space: nowrap;margin: 10px 0 0 0;color: #000000\">\n  \uff08\u5907\u7528\u5fae\u4fe1\u53f7\uff1a  <span style=\"color: #0066ff;font-weight: bold;font-style: italic\"> domsm789  <\/span> \uff09<\/div>\n<p><!-- AI-GLOBAL-END --><\/p>\n<h2><a href=\"https:\/\/bdsmq.com\/21690\/\" title=\"k8\">k8<\/a>\u7b80\u8ff0\u4e0e\u57fa\u672c\u6982\u5ff5<\/h2>\n<p> <a href=\"https:\/\/bdsmq.com\/21690\/\" title=\"k8\">k8<\/a>\u662f\u201c<a href=\"https:\/\/bdsmq.com\/22681\/\" title=\"Kubernetes\">Kubernetes<\/a>\u201d\u7684\u7f29\u5199\uff0c\u540e\u8005\u6e90\u81ea\u5e0c\u814a\u6587\uff0c\u610f\u4e3a\u201c\u8235\u624b\u201d\u3002 <a href=\"https:\/\/bdsmq.com\/22681\/\" title=\"Kubernetes\">Kubernetes<\/a>\u662f\u7531\u8c37\u6b4c\u5f00\u53d1\u5e76\u5f00\u6e90\u7684\u4e00\u4e2a<a href=\"https:\/\/bdsmq.com\/7921\/\" title=\"\u5bb9\u5668\u7f16\u6392\">\u5bb9\u5668\u7f16\u6392<\/a>\u5e73\u53f0\uff0c\u4e3b\u8981\u7528\u4e8e<a href=\"https:\/\/bdsmq.com\/31105\/\" title=\"\u81ea\u52a8\u5316\u90e8\u7f72\">\u81ea\u52a8\u5316\u90e8\u7f72<\/a>\u3001\u6269\u5c55\u548c\u7ba1\u7406\u5bb9\u5668\u5316\u5e94\u7528\u3002 <a href=\"https:\/\/bdsmq.com\/22973\/\" title=\"k8\">k8<\/a>\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u7ba1\u7406\u4f60\u7684\u5e94\u7528\u548c\u670d\u52a1\uff0c\u4f7f\u5b83\u4eec\u80fd\u591f\u5728\u4efb\u4f55\u73af\u5883\u4e2d\u987a\u5229\u8fd0\u884c\u3002<\/p>\n<p>\u4eb2\u8eab\u7ecf\u5386\u544a\u8bc9\u6211\uff0c\u4f7f\u7528<a href=\"https:\/\/bdsmq.com\/22973\/\" title=\"k8\">k8<\/a>\u53ef\u4ee5\u6781\u5927\u5730\u63d0\u9ad8\u5f00\u53d1\u548c\u8fd0\u7ef4\u7684\u6548\u7387\u3002\u53bb\u5e74\u6211\u5e2e\u670b\u53cb\u5728\u4e00\u5bb6\u521d\u521b\u516c\u53f8\u642d\u5efa\u4ed6\u4eec\u7684\u5fae\u670d\u52a1\u67b6\u6784\uff0c\u91c7\u7528\u4e86k8\u5927\u5927\u7b80\u5316\u4e86\u90e8\u7f72\u5de5\u4f5c\u3002\u4e4b\u524d\u6bcf\u6b21\u4e0a\u7ebf\u90fd\u8981\u624b\u5de5\u914d\u7f6e\uff0c\u5bb9\u6613\u51fa\u9519\uff0c\u8fd8\u6d6a\u8d39\u65f6\u95f4\uff0c\u4f46\u7528\u4e86k8\u540e\uff0c\u901a\u8fc7\u4e00\u4e9b\u57fa\u672c\u914d\u7f6e\u5c31\u80fd\u81ea\u52a8\u5b8c\u6210\uff0c\u7701\u5fc3\u4e86\u8bb8\u591a\u3002<\/p>\n<h2>k8\u7684\u7279\u70b9\u4e0e\u4f18\u52bf<\/h2>\n<p> k8\u7a76\u7adf\u6709\u54ea\u4e9b\u7279\u70b9\u548c\u4f18\u52bf\u5462\uff1f\u4e00\u4e2a\u6700\u660e\u663e\u7684\u5c31\u662f\u5b83\u7684<strong>\u53ef\u6269\u5c55\u6027<\/strong>\u3002k8\u652f\u6301\u5927\u89c4\u6a21\u7684<a href=\"https:\/\/bdsmq.com\/7921\/\" title=\"\u5bb9\u5668\u7f16\u6392\">\u5bb9\u5668\u7f16\u6392<\/a>\uff0c\u4e0d\u7ba1\u4f60\u6709\u591a\u5c11\u4e2a\u8282\u70b9\uff0c\u53ea\u8981\u4f60\u8bbe\u7f6e\u5f97\u5f53\uff0c\u5b83\u90fd\u80fd\u8f7b\u677e\u5e94\u5bf9\u3002\u800c\u4e14\uff0ck8\u5141\u8bb8\u4f60\u6839\u636e\u8d1f\u8f7d\u81ea\u52a8\u6c34\u5e73\u6269\u5c55\uff0c\u8fd9\u6837\u53ef\u4ee5\u5728\u7528\u6237\u91cf\u6fc0\u589e\u65f6\uff0c\u4fdd\u8bc1\u4f60\u7684\u5e94\u7528\u6027\u80fd\u4e0d\u53d7\u5f71\u54cd\u3002<\/p>\n<p> k8\u8fd8\u6709\u4e00\u4e2a\u5f88\u91cd\u8981\u7684\u529f\u80fd\u53eb<strong>\u81ea\u6108\u80fd\u529b<\/strong>\u3002\u8fd9\u662f\u4ec0\u4e48\u610f\u601d\u5462\uff1f\u5047\u8bbe\u4f60\u7684\u5e94\u7528\u51fa\u73b0\u4e86\u6545\u969c\uff0ck8\u4f1a\u81ea\u52a8\u68c0\u6d4b\u5e76\u5c06\u6545\u969c\u5b9e\u4f8b\u91cd\u542f\uff0c\u786e\u4fdd\u5e94\u7528\u59cb\u7ec8\u5728\u6b63\u5e38\u7684\u72b6\u6001\u8fd0\u884c\u3002\u8fd9\u5bf9\u4e8e\u6211\u4eec\u8fd9\u4e9b\u5f00\u53d1\u8005\u6765\u8bf4\uff0c\u771f\u7684\u5c31\u50cf\u6709\u4e00\u4e2a\u968f\u65f6\u5f85\u547d\u7684\u52a9\u7406\uff0c\u8ba9\u4eba\u975e\u5e38\u7701\u5fc3\u3002<\/p>\n<p>\u81f3\u4e8e\u914d\u7f6e\u7ba1\u7406\uff0ck8\u4e5f\u4e0d\u843d\u4e0b\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528<strong>ConfigMap<\/strong>\u548c<strong>Secrets<\/strong>\u6765\u7ba1\u7406\u5e94\u7528\u7684\u914d\u7f6e\u4fe1\u606f\uff0c\u907f\u514d\u654f\u611f\u4fe1\u606f\u786c\u7f16\u7801\u3002\u8fd9\u4e00\u70b9\u5728\u6211\u4e4b\u524d\u7684\u9879\u76ee\u4e2d\u5c31\u975e\u5e38\u5b9e\u7528\uff0c\u4e0d\u8bba\u662f\u73af\u5883\u53d8\u91cf\u8fd8\u662f\u6570\u636e\u5e93\u5bc6\u7801\uff0c\u901a\u8fc7k8\u5c31\u80fd\u8f7b\u677e\u7ba1\u7406\uff0c\u5b89\u5168\u53c8\u9ad8\u6548\u3002<\/p>\n<figure class=\"wp-block-image size-full aligncenter\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='https:\/\/bdsmq.com\/wp-content\/uploads\/2025\/12\/api_img_694708fa770ea.webp'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  decoding=\"async\" data-original=\"https:\/\/bdsmq.com\/wp-content\/uploads\/2025\/12\/api_img_694708fa770ea.webp\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"k8\u5230\u5e95\u662f\u4ec0\u4e48\uff1f\u63ed\u5f00\u4f60\u6240\u4e0d\u77e5\u9053\u7684\u795e\u79d8\u9762\u7eb1 \u4e00\" \/><\/div><\/figure>\n<h2>\u4f7f\u7528k8\u7684\u5b9e\u64cd\u6280\u5de7<\/h2>\n<p>\u73b0\u5728\u8bf4\u8bf4\u5982\u4f55\u5f00\u59cb\u4f7f\u7528k8\u3002 \u4f60\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u5b89\u88c5k8\uff0c\u6bd4\u5982\u4f7f\u7528Minikube\u5728\u672c\u5730\u642d\u5efa\u4e00\u4e2a\u5f00\u53d1\u73af\u5883\uff0c\u6216\u8005\u5728\u4e91\u5e73\u53f0\u4e0a\u4f7f\u7528\u76f8\u5e94\u7684\u670d\u52a1\u3002\u5f88\u591a\u5f00\u53d1\u8005\u5728\u5f00\u59cb\u65f6\u4f1a\u9009\u62e9Minikube\uff0c\u56e0\u4e3a\u8fd9\u6837\u53ef\u4ee5\u66f4\u52a0\u8f7b\u677e\u5730\u8fdb\u884c\u6d4b\u8bd5\uff0c\u800c\u4e0d\u5fc5\u642d\u5efa\u590d\u6742\u7684\u751f\u4ea7\u73af\u5883\u3002<\/p>\n<p> \u4e00\u65e6\u73af\u5883\u642d\u5efa\u597d\uff0c\u5c31\u53ef\u4ee5\u5f00\u59cb\u7f16\u5199<strong>YAML\u914d\u7f6e\u6587\u4ef6<\/strong>\uff0c\u8fd9\u4e2a\u6587\u4ef6\u4e3b\u8981\u7528\u6765\u5b9a\u4e49Pod\u3001Service\u7b49\u5bf9\u8c61\u3002\u5bf9\u4e8e\u65b0\u624b\u6765\u8bf4\uff0c\u6211\u521a\u5f00\u59cb\u4e5f\u6ca1\u641e\u660e\u767d\u8fd9\u4e9b\u914d\u7f6e\uff0c\u540e\u6765\u53c2\u8003\u4e86\u5f88\u591a\u7f51\u4e0a\u7684\u5b9e\u4f8b\uff0c\u6162\u6162\u5c31\u9002\u5e94\u4e86\u3002\u53ef\u4ee5\u8bf4\uff0cYAML\u6587\u4ef6\u683c\u5f0f\u662fk8\u7684\u6838\u5fc3\uff0c\u4f60\u5c06\u82b1\u4e0d\u5c11\u65f6\u95f4\u5728\u8fd9\u4e0a\u9762\uff0c\u4f46\u5b83\u771f\u7684\u5f88\u503c\u5f97\u3002<\/p>\n<p>\u6211 \u4f60\u5c3d\u91cf\u591a\u5b9e\u8df5\uff0c\u591a\u505a\u51e0\u4e2a\u5c0f\u9879\u76ee\uff0c\u8ddf\u7740\u6559\u7a0b\u4e00\u6b65\u6b65\u8d70\u3002\u4f60\u80fd\u770b\u5230\u4f60\u7684\u5e94\u7528\u662f\u5982\u4f55\u88ab\u5bb9\u5668\u5316\u7684\uff0c\u5982\u4f55\u88abk8\u7ba1\u7406\uff0c\u8fd9\u4e2a\u8fc7\u7a0b\u4e00\u5b9a\u4f1a\u8ba9\u4f60\u611f\u5230\u6210\u5c31\u611f\u6ee1\u6ee1\u3002\u5176\u5b9e\u53ea\u8981\u4f60\u613f\u610f\u52a8\u624b\uff0ck8\u7684\u5b66\u4e60\u66f2\u7ebf\u5e76\u4e0d\u4f1a\u5f88\u9661\u5ced\u3002<\/p>\n<p>\u5047\u5982\u4f60\u5728\u4f7f\u7528\u8fc7\u7a0b\u4e2d\u6709\u4efb\u4f55\u7591\u95ee\uff0c\u4e0d\u59a8\u53bb\u8bbf\u95ee <a href=\"https:\/\/kubernetes.io\/docs\/\">Kubernetes\u7684\u5b98\u65b9\u6587\u6863<\/a>\uff08nofollow\uff09\u3002\u8fd9\u4e2a\u6587\u6863\u975e\u5e38\u5168\u9762\uff0c\u4e0d\u7ba1\u662f\u65b0\u624b\u8fd8\u662f\u8001\u624b\u90fd\u80fd\u627e\u5230\u4f60\u9700\u8981\u7684\u5185\u5bb9\u3002 \u793e\u533a\u4e5f\u975e\u5e38\u6d3b\u8dc3\uff0c\u6709\u5927\u91cf\u7684\u6559\u7a0b\u548c\u793a\u4f8b\u53ef\u4f9b\u53c2\u8003\u3002<\/p>\n<p>\u5982\u679c\u4f60\u8fd8\u5728\u72b9\u8c6b\uff0c\u4e0d\u59a8\u8bd5\u8bd5\u6211\u63d0\u5230\u7684\u65b9\u6cd5\uff0c\u76f8\u4fe1k8\u4f1a\u5e26\u7ed9\u4f60\u610f\u60f3\u4e0d\u5230\u7684\u4fbf\u5229\u548c\u6548\u7387\u63d0\u5347\uff01\u5982\u679c\u4f60\u6309\u8fd9\u4e9b\u65b9\u6cd5\u8bd5\u4e86\uff0c\u6b22\u8fce\u56de\u6765\u544a\u8bc9\u6211\u6548\u679c\uff01<\/p>\n<p style=\"font-style: italic;font-weight: bold;font-size: 0;white-space: nowrap;margin: 0;padding: 0\">\n  <span style=\"vertical-align: middle;font-size: 24px;color: #555555\">  \u65b0\u4eba\u5165\u5708  <\/span>  <span style=\"vertical-align: middle;font-size: 24px\"> \ud83d\udc49  <\/span>  <a href=\"https:\/\/work.weixin.qq.com\/ca\/cawcdedbb35988d0f8\" target=\"_blank\" style=\"text-decoration: none;vertical-align: middle;font-size: 24px;color: #ff0000;font-style: italic;font-weight: bold\"> \u70b9\u51fb\u8fd9\u91cc  <\/a> <span style=\"vertical-align: middle;font-size: 24px\"> \ud83d\udc48  <\/span><\/p>\n<p style=\"font-style: italic;font-size: 24px;white-space: nowrap;margin: 10px 0 0 0;color: #000000\">\n  \uff08\u5907\u7528\u5fae\u4fe1\u53f7\uff1a  <span style=\"color: #0066ff;font-weight: bold;font-style: italic\"> domsm789  <\/span> \uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u65b0\u4eba\u5165\u5708 \ud83d\udc49 \u70b9\u51fb\u8fd9\u91cc \ud83d\udc48 \uff08\u5907\u7528\u5fae\u4fe1\u53f7\uff1a domsm789 \uff09 k8\u7b80\u8ff0\u4e0e\u57fa\u672c\u6982\u5ff5 k8\u662f\u201cKubernet [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":35467,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[121,301,304,302,359],"class_list":["post-35468","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-10","tag-k8","tag-kubernetes","tag-304","tag-302","tag-359"],"views":122,"_links":{"self":[{"href":"https:\/\/bdsmq.com\/index.php?rest_route=\/wp\/v2\/posts\/35468","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bdsmq.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bdsmq.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bdsmq.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bdsmq.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=35468"}],"version-history":[{"count":2,"href":"https:\/\/bdsmq.com\/index.php?rest_route=\/wp\/v2\/posts\/35468\/revisions"}],"predecessor-version":[{"id":35470,"href":"https:\/\/bdsmq.com\/index.php?rest_route=\/wp\/v2\/posts\/35468\/revisions\/35470"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bdsmq.com\/index.php?rest_route=\/wp\/v2\/media\/35467"}],"wp:attachment":[{"href":"https:\/\/bdsmq.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=35468"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bdsmq.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=35468"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bdsmq.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=35468"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}