{"id":17904,"date":"2025-06-22T10:41:14","date_gmt":"2025-06-22T02:41:14","guid":{"rendered":"https:\/\/92it.top\/?p=17904"},"modified":"2025-06-22T10:41:14","modified_gmt":"2025-06-22T02:41:14","slug":"%e4%ba%91%e5%8e%9f%e7%94%9f-%e5%be%ae%e6%9c%8d%e5%8a%a1%e6%9d%82%e8%b0%88","status":"publish","type":"post","link":"https:\/\/92it.top\/?p=17904","title":{"rendered":"\u4e91\u539f\u751f-\u5fae\u670d\u52a1\u6742\u8c08"},"content":{"rendered":"\n<p>\u8f6c\u8f7d\uff1a<a href=\"https:\/\/www.thebyte.com.cn\/architecture\/MicroService.html\">https:\/\/www.thebyte.com.cn\/architecture\/MicroService.html<\/a><\/p>\n\n\n\n<p><strong>\u5fae\u670d\u52a1<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u5fae\u670d\u52a1\u7684\u6982\u5ff5\u63d0\u51fa\u4e4b\u540e\uff0c\u7531\u4e8e\u7406\u8bba\u4e0d\u5b8c\u5584\uff0c\u52a0\u4e0a\u6280\u672f\u4e0d\u6210\u719f\uff0c\u5728\u4e00\u6bb5\u65f6\u95f4\u5185\u5e76\u6ca1\u6709\u88ab\u5e7f\u6cdb\u5173\u6ce8\u3002<\/p>\n\n\n\n<p>\u76f4\u5230 2014 \u5e74\uff0c\u7ecf\u8fc7 Martin Fowler\uff08\u300aMicroServices\u300b\u4f5c\u8005\uff09\u3001Adrian Cockcroft\uff08Netflix \u67b6\u6784\u5e08\uff09\u3001Neal ford\uff08\u300a\u5353\u6709\u6210\u6548\u7684\u7a0b\u5e8f\u5458\u300b\u4f5c\u8005\uff09\u7b49\u4eba\u6301\u7eed\u4ecb\u7ecd\u3001\u5b8c\u5584\u3001\u6f14\u8fdb\u548c\u5b9e\u8df5\u4e4b\u540e\uff0c\u5fae\u670d\u52a1\u624d\u7b97\u662f\u4e00\u79cd\u771f\u6b63\u4e30\u6ee1\u3001\u72ec\u7acb\u7684\u67b6\u6784\u98ce\u683c\u3002<\/p>\n\n\n\n<p>\u5bf9\u4e8e\u5fae\u670d\u52a1\u7684\u5b9a\u4e49\uff0c\u63f4\u5f15 Netflix<sup><a href=\"https:\/\/www.thebyte.com.cn\/architecture\/MicroService.html#footnote1\">[1]<\/a><\/sup> \u4e91\u67b6\u6784\u5e08 Adrian Cockcroft \u7684\u89c2\u70b9\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">A microservices architecture as a service\u2011oriented architecture composed of loosely coupled elements that have bounded contexts.<br><br>\u5fae\u670d\u52a1\u67b6\u6784\u662f\u4e00\u79cd\u9762\u5411\u670d\u52a1\u7684\u67b6\u6784\uff0c\u7531\u677e\u8026\u5408\u7684\u5177\u6709\u6709\u9650\u4e0a\u4e0b\u6587\u7684\u5143\u7d20\u7ec4\u6210\u3002<\/pre>\n\n\n\n<p>Adrian Cockcroft \u7684\u89c2\u70b9\u4e2d\u6709\u4e24\u4e2a\u6838\u5fc3\u6982\u5ff5\uff1a<\/p>\n\n\n\n<ol>\n<li>\u677e\u8026\u5408\uff08Loosely Coupled\uff09\uff1a\u610f\u5473\u7740\u6bcf\u4e2a\u670d\u52a1\u53ef\u4ee5\u72ec\u7acb\u7684\u66f4\u65b0\uff0c\u66f4\u65b0\u4e00\u4e2a\u670d\u52a1\u65e0\u9700\u8981\u6c42\u6539\u53d8\u5176\u4ed6\u670d\u52a1\u3002<\/li>\n\n\n\n<li>\u9650\u754c\u4e0a\u4e0b\u6587\uff08Bounded Contexts\uff09\uff1a\u610f\u5473\u7740\u6bcf\u4e2a\u670d\u52a1\u8981\u6709\u660e\u786e\u7684\u8fb9\u754c\u6027\uff0c\u4f60\u53ef\u4ee5\u53ea\u5173\u6ce8\u81ea\u8eab\u8f6f\u4ef6\u7684\u53d1\u5e03\uff0c\u800c\u65e0\u9700\u8003\u8651\u8c01\u5728\u4f9d\u8d56\u4f60\u7684\u53d1\u5e03\u7248\u672c\u3002\u5fae\u670d\u52a1\u548c\u5b83\u7684\u6d88\u8d39\u8005\u4e25\u683c\u901a\u8fc7 API \u8fdb\u884c\u4ea4\u4e92\uff0c\u4e0d\u5171\u4eab\u6570\u636e\u7ed3\u6784\u3001\u6570\u636e\u5e93\u7b49\u3002\u57fa\u4e8e\u5951\u7ea6\u7684\u5fae\u670d\u52a1\u89c4\u8303\u8981\u6c42\u670d\u52a1\u63a5\u53e3\u662f\u7a33\u5b9a\u7684\uff0c\u800c\u4e14\u5411\u4e0b\u517c\u5bb9\u3002<\/li>\n<\/ol>\n\n\n\n<p>\u7efc\u5408\u4e0a\u8ff0\uff0c\u4e5f\u5c31\u8bf4\u5fae\u670d\u52a1\u67b6\u6784\u7684\u7279\u5f81\u662f\uff1a\u670d\u52a1\u4e4b\u95f4\u72ec\u7acb\u90e8\u7f72\uff0c\u62e5\u6709\u5404\u81ea\u7684\u6280\u672f\u6808\uff0c\u5404\u81ea\u754c\u5b9a\u4e0a\u4e0b\u6587\u7b49\u3002<\/p>\n\n\n\n<p>\u5982\u56fe 1-18 \u6240\u793a\uff0c\u5de8\u77f3\u5e94\u7528\uff08Monolith Application\uff09\u4e0e\u5fae\u670d\u52a1\uff08Microservices\uff09\u7684\u5f62\u8c61\u5bf9\u6bd4\uff1a<\/p>\n\n\n\n<ul>\n<li>\u5de8\u77f3\u5e94\u7528\u5c31\u662f\u628a\u6240\u6709\u7684\u4e1c\u897f\u653e\u5728\u4e00\u4e2a\u5927\u76d2\u5b50\u91cc\uff0c\u8fd9\u4e2a\u5927\u76d2\u5b50\u91cc\u9762\u4ec0\u4e48\u90fd\u6709\u3002<\/li>\n\n\n\n<li>\u800c\u5fae\u670d\u52a1\u66f4\u50cf\u662f\u96c6\u88c5\u7bb1\uff0c\u6bcf\u4e2a\u7bb1\u5b50\u91cc\u9762\u5305\u542b\u7279\u5b9a\u7684\u529f\u80fd\u6a21\u5757\uff0c\u6240\u6709\u7684\u4e1c\u897f\u53ef\u4ee5\u5f88\u7075\u6d3b\u7684\u62c6\u5206\u548c\u7ec4\u88c5\u3002<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"600\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-260-1024x600.png\" alt=\"\" class=\"wp-image-17908\" style=\"width:432px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-260-1024x600.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-260-300x176.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-260-768x450.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-260-830x486.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-260-230x135.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-260-350x205.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-260-480x281.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-260.png 1028w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>\u6216\u8bb8\u4f60\u770b\u8fc7\u8fd9\u5f20\u5728\u4e92\u8054\u7f51\u6d41\u4f20\u9887\u5e7f\u5fae\u670d\u52a1\u67b6\u6784\u56fe\uff08\u56fe 1-19\uff09\u3002Uber \u7684\u5fae\u670d\u52a1\u67b6\u6784\u4e2d\uff0c\u6253\u8f66\u8f6f\u4ef6\u7cfb\u7edf\u88ab\u5206\u89e3\u591a\u4e2a\u5b50\u670d\u52a1\uff08\u56fe\u4e2d\u7684\u516d\u8fb9\u5f62\uff09\uff0c\u6bcf\u4e2a\u5b50\u670d\u52a1\u90fd\u56f4\u7ed5\u6574\u4f53\u7cfb\u7edf\u7684\u67d0\u4e2a\u5c40\u90e8\u529f\u80fd\u8fdb\u884c\u6784\u5efa\u3002\u4f8b\u5982\uff1a<\/p>\n\n\n\n<ul>\n<li>PASSENGER \u5b50\u670d\u52a1\u53ea\u5904\u7406\u4e58\u5ba2\u76f8\u5173\u7684\u529f\u80fd\uff1b<\/li>\n\n\n\n<li>PAYMENTS \u5b50\u670d\u52a1\u53ea\u5904\u7406\u8ba2\u5355\u7684\u529f\u80fd\uff1b<\/li>\n\n\n\n<li>API GATEWAY \u670d\u52a1\u662f\u7edf\u4e00\u7684\u8bf7\u6c42\u5165\u53e3\uff0c\u5b83\u5904\u7406\u4e0e\u5b89\u5168\u3001\u670d\u52a1\u6cbb\u7406\u76f8\u5173\u7684\u64cd\u4f5c\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u5b50\u670d\u52a1\u5177\u6709\u677e\u8026\u5408\u4ee5\u53ca\u660e\u786e\u7684\u529f\u80fd\u8fb9\u754c\u7279\u6027\uff0c\u56e0\u6b64\u53ef\u4ee5\u72ec\u7acb\u7684\u8fdb\u884c\u90e8\u7f72\u548c\u6269\u5c55\u3002\u5b83\u4eec\u4e4b\u95f4\u534f\u4f5c\u7684\u8bdd\u901a\u8fc7\u4e00\u4e9b\u8f7b\u91cf\u7ea7\u7684\u673a\u5236\uff08\u5982 RESTful API\u3001RPC\uff09\u8fdb\u884c\u901a\u4fe1\uff0c<\/p>\n\n\n\n<p>\u56fe \u6765\u81ea Uber \u6253\u8f66\u8f6f\u4ef6\u7684\u5fae\u670d\u52a1\u67b6\u6784\u793a\u4f8b<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1007\" height=\"1024\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/micro-service-1-BZZdM-Fi-1007x1024.png\" alt=\"\" class=\"wp-image-17909\" style=\"width:516px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/micro-service-1-BZZdM-Fi-1007x1024.png 1007w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/micro-service-1-BZZdM-Fi-295x300.png 295w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/micro-service-1-BZZdM-Fi-768x781.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/micro-service-1-BZZdM-Fi-830x844.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/micro-service-1-BZZdM-Fi-230x234.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/micro-service-1-BZZdM-Fi-350x356.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/micro-service-1-BZZdM-Fi-480x488.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/micro-service-1-BZZdM-Fi.png 1404w\" sizes=\"(max-width: 1007px) 100vw, 1007px\" \/><\/figure><\/div>\n\n\n<p> \u3000<\/p>\n\n\n\n<p><strong>\u5fae\u670d\u52a1\u5e26\u6765\u7684\u6280\u672f\u6311\u6218<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u5fae\u670d\u52a1\u67b6\u6784\u9996\u5148\u662f\u4e00\u4e2a\u5206\u5e03\u5f0f\u7684\u67b6\u6784\uff0c\u5206\u5e03\u5f0f\u610f\u5473\u7740\u590d\u6742\u6027\u7684\u6311\u6218\u3002<\/p>\n\n\n\n<p>\u8f6f\u4ef6\u67b6\u6784\u4ece\u5de8\u77f3\u5e94\u7528\u5411\u5fae\u670d\u52a1\u67b6\u6784\u8f6c\u578b\u7684\u8fc7\u7a0b\u4e2d\u5e26\u6765\u4e86\u4e00\u7cfb\u5217\u7684\u975e\u529f\u80fd\u6027\u9700\u6c42\uff0c\u4f8b\u5982\uff1a<\/p>\n\n\n\n<ul>\n<li>\u670d\u52a1\u53d1\u73b0\uff08Service Discovery\uff09\u95ee\u9898\uff1a\u89e3\u51b3\u201c\u6211\u60f3\u8c03\u7528\u4f60\uff0c\u5982\u4f55\u627e\u5230\u4f60\u201d\u7684\u95ee\u9898\u3002<\/li>\n\n\n\n<li>\u670d\u52a1\u7194\u65ad\uff08Circuit Breaker\uff09\u95ee\u9898\uff1a\u7f13\u89e3\u670d\u52a1\u4e4b\u95f4\u4f9d\u8d56\u7684\u4e0d\u53ef\u9760\u95ee\u9898\u3002<\/li>\n\n\n\n<li>\u8d1f\u8f7d\u5747\u8861\uff08Load Balancing\uff09\u95ee\u9898\uff1a\u901a\u8fc7\u5747\u5300\u5206\u914d\u6d41\u91cf\uff0c\u8ba9\u8bf7\u6c42\u5904\u7406\u66f4\u52a0\u53ca\u65f6\u3002<\/li>\n\n\n\n<li>\u5b89\u5168\u901a\u8baf\u95ee\u9898\uff1a\u5305\u62ec\u534f\u8bae\u52a0\u5bc6\uff08TLS\uff09\u3001\u8eab\u4efd\u8ba4\u8bc1\uff08\u8bc1\u4e66\/\u7b7e\u540d\uff09\u3001\u8bbf\u95ee\u9274\u6743\uff08RBAC\uff09\u7b49\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u89e3\u51b3\u8fd9\u4e9b\u95ee\u9898\u9700\u8981\u7f16\u5199\u548c\u7ef4\u62a4\u2f24\u91cf\u975e\u529f\u80fd\u6027\u4ee3\u7801\uff0c\u8fd9\u4e9b\u4ee3\u7801\u4e0e\u4e1a\u52a1\u4ee3\u7801\u903b\u8f91\u6df7\u5728\u4e00\u8d77\uff0c\u52a8\u4e0d\u52a8\u8fd8\u4f1a\u9047\u5230\u70b9\u532a\u5937\u6240\u601d\u7684\u5206\u5e03\u5f0f bug\u3002\u6240\u4ee5\u8bf4\uff0c\u57fa\u7840\u8bbe\u65bd\u4e0d\u5b8c\u5584\u7684\u8bdd\uff0c\u5b9e\u65bd\u5fae\u670d\u52a1\u5f88\u75db\u82e6\uff0c\u670d\u52a1\u8d8a\u591a\u8d8a\u60b2\u5267\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"_2-\u540e\u5fae\u670d\u52a1\u65f6\u4ee3\">\u3000<\/h2>\n\n\n\n<p><strong>\u540e\u5fae\u670d\u52a1\u65f6\u4ee3<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<pre class=\"wp-block-preformatted\">\u540e\u5fae\u670d\u52a1\u65f6\u4ee3<br><br>\u4ece\u8f6f\u4ef6\u5c42\u9762\u72ec\u529b\u5e94\u5bf9\u5fae\u670d\u52a1\u67b6\u6784\u95ee\u9898\uff0c\u53d1\u5c55\u5230\u8f6f\u3001\u786c\u4e00\u4f53\uff0c\u5408\u529b\u5e94\u5bf9\u67b6\u6784\u95ee\u9898\u7684\u65f6\u4ee3\uff0c\u6b64\u5373\u4e3a\u201c\u540e\u5fae\u670d\u52a1\u65f6\u4ee3\u201d\u3002<br><br>\u2014\u2014 by\u300a\u51e4\u51f0\u67b6\u6784\u300b\u4f5c\u8005 \u5468\u5fd7\u660e<\/pre>\n\n\n\n<p>\u5fae\u670d\u52a1\u67b6\u6784\u4e2d\uff0c\u6709\u4e00\u4e9b\u5fc5\u987b\u89e3\u51b3\u7684\u95ee\u9898\uff0c\u5982\u8d1f\u8f7d\u5747\u8861\u3001\u4f38\u7f29\u6269\u5bb9\u3001\u4f20\u8f93\u901a\u8baf\u7b49\u7b49\uff0c\u8fd9\u4e9b\u95ee\u9898\u53ef\u4ee5\u8bf4\u53ea\u8981\u662f\u5206\u5e03\u5f0f\u67b6\u6784\u7684\u7cfb\u7edf\u5c31\u65e0\u6cd5\u5b8c\u5168\u907f\u514d\u3002\u76f4\u63a5\u6765\u770b\u5f85\u8fd9\u4e9b\u95ee\u9898\u4e0e\u5b83\u4eec\u6700\u5e38\u89c1\u7684\u89e3\u51b3\u65b9\u6cd5\uff1a<\/p>\n\n\n\n<ul>\n<li>\u5982\u679c\u67d0\u4e2a\u7cfb\u7edf\u9700\u8981\u89e3\u51b3\u8d1f\u8f7d\u5747\u8861\u95ee\u9898\uff0c\u901a\u5e38\u4f1a\u5e03\u7f6e\u8d1f\u8f7d\u5747\u8861\u5668\uff0c\u9009\u62e9\u6070\u5f53\u7684\u5747\u8861\u7b97\u6cd5\u6765\u5206\u6d41\uff1b<\/li>\n\n\n\n<li>\u5982\u679c\u67d0\u4e2a\u7cfb\u7edf\u9700\u8981\u4f38\u7f29\u6269\u5bb9\uff0c\u901a\u5e38\u4f1a\u8d2d\u4e70\u65b0\u7684\u670d\u52a1\u5668\uff0c\u591a\u90e8\u7f72\u51e0\u5957\u526f\u672c\u5b9e\u4f8b\uff1b<\/li>\n\n\n\n<li>\u5982\u679c\u8981\u89e3\u51b3\u5b89\u5168\u7684\u4f20\u8f93\u901a\u8baf\uff0c\u901a\u5e38\u8981\u5e03\u7f6e TLS \u94fe\u8def\uff0c\u8bbe\u7f6e CA \u8bc1\u4e66\uff0c\u4fdd\u8bc1\u4e2d\u95f4\u4e0d\u88ab\u7a83\u542c\uff0c\u7b49\u7b49\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u5148\u4e0d\u8003\u8651 Apache Dubbo\u3001SpringCloud \u6216\u8005\u522b\u7684\u89e3\u51b3\u65b9\u6848\uff0c\u5148\u6362\u4e2a\u601d\u8def\u60f3\u4e00\u4e0b\uff1a\u201c\u8fd9\u4e9b\u95ee\u9898\u4e00\u5b9a\u8981\u7531\u5206\u5e03\u5f0f\u7cfb\u7edf\u81ea\u5df1\u6765\u89e3\u51b3\u5417\uff1f\u201d\u3002<\/p>\n\n\n\n<p>\u8ba1\u7b97\u673a\u79d1\u5b66\u7684\u591a\u5e74\u53d1\u5c55\u5df2\u7ecf\u4ea7\u751f\u4e86\u4e13\u4e1a\u5316\u7684\u57fa\u7840\u8bbe\u65bd\u53bb\u89e3\u51b3\u5404\u79cd\u95ee\u9898\u3002\u5fae\u670d\u52a1\u65f6\u4ee3\uff0c\u4e4b\u6240\u4ee5\u9009\u62e9\u5728\u5e94\u7528\u670d\u52a1\u5c42\u9762\uff0c\u800c\u975e\u57fa\u7840\u8bbe\u65bd\u5c42\u9762\u53bb\u89e3\u51b3\u8fd9\u4e9b\u5206\u5e03\u5f0f\u95ee\u9898\uff0c\u4e3b\u8981\u662f<strong>\u56e0\u4e3a\u786c\u4ef6\u6784\u5efa\u7684\u57fa\u7840\u8bbe\u65bd\u65e0\u6cd5\u8ffd\u8d76\u4e0a\u8f6f\u4ef6\u6784\u6210\u7684\u5e94\u7528\u670d\u52a1\u7684\u7075\u6d3b\u6027<\/strong>\u3002<\/p>\n\n\n\n<p>\u6211\u4eec\u5728 1.1 \u8282\u8ba8\u8bba\u7684\u4e91\u8ba1\u7b97\u7684\u6f14\u5316\u4e2d\uff0c\u770b\u5230\u5e94\u7528\u7684\u5de5\u4f5c\u8d1f\u8f7d\u6700\u7ec8\u4ece\u7269\u7406\u673a\u8fdb\u5316\u5230\u5bb9\u5668\uff0c\u90e8\u7f72\u65b9\u5f0f\u8d8a\u6765\u8d8a\u7075\u6d3b\u3002\u4e0d\u8fc7\uff0c\u65e9\u671f\u7684\u5bb9\u5668\u6280\u672f\u4e3b\u8981\u88ab\u89c6\u4e3a\u4e00\u79cd\u80fd\u591f\u5feb\u901f\u542f\u52a8\u670d\u52a1\u7684\u73af\u5883\uff0c\u4e3b\u8981\u7528\u4e8e\u7b80\u5316\u7a0b\u5e8f\u7684\u5206\u53d1\u548c\u90e8\u7f72\u3002\u8fd9\u4e00\u9636\u6bb5\uff0c\u5bb9\u5668\u4e3b\u8981\u4f5c\u4e3a\u5355\u4e2a\u5e94\u7528\u7684\u5c01\u88c5\u5de5\u5177\uff0c\u5e76\u672a\u6df1\u5165\u53c2\u4e0e\u89e3\u51b3\u5206\u5e03\u5f0f\u67b6\u6784\u7684\u95ee\u9898\u3002<\/p>\n\n\n\n<p>\u88ab\u4e1a\u754c\u5e7f\u6cdb\u8ba4\u53ef\u3001\u666e\u904d\u91c7\u7528\u7684\u901a\u8fc7\u865a\u62df\u5316\u57fa\u7840\u8bbe\u65bd\u53bb\u89e3\u51b3\u5206\u5e03\u5f0f\u67b6\u6784\u95ee\u9898\u7684\u5f00\u7aef\uff0c\u5e94\u8be5\u8981\u4ece 2017 \u5e74 Kubernetes \u8d62\u5f97\u5bb9\u5668\u6218\u4e89\u7684\u80dc\u5229\u5f00\u59cb\u7b97\u8d77\u3002\u76f4\u63a5\u6765\u770b Kubernetes \u5728\u57fa\u7840\u8bbe\u65bd\u5c42\u9762\uff0c\u89e3\u51b3\u5206\u5e03\u5f0f\u7cfb\u7edf\u95ee\u9898\u7684\u65b9\u6848\uff1a<\/p>\n\n\n\n<ul>\n<li>Kubernetes \u7528 CoreDNS \u66ff\u4ee3 Spring Cloud \u670d\u52a1\u53d1\u73b0\u7ec4\u4ef6 Eureka\u3002<\/li>\n\n\n\n<li>Kubernetes \u7528 Service\/Load Balancer \u66ff\u4ee3 Spring Cloud \u4e2d\u7684\u8d1f\u8f7d\u5747\u8861\u7ec4\u4ef6 Ribbon\u3002<\/li>\n\n\n\n<li>Kubernetes \u7528 ConfigMap \u66ff\u4ee3 Spring Cloud \u7684\u914d\u7f6e\u4e2d\u5fc3 Config\u3002<\/li>\n\n\n\n<li>Kubernetes \u7528 Ingress \u4ee3\u66ff Spring Cloud \u7684\u7f51\u5173\u7ec4\u4ef6 Zuul\u3002<\/li>\n\n\n\n<li>&#8230;<\/li>\n<\/ul>\n\n\n\n<p>\u5982\u56fe 1-20 \u6240\u793a\uff0c\u4f20\u7edf\u5fae\u670d\u52a1\u6846\u67b6\u89e3\u51b3\u7684\u95ee\u9898\uff0c\u5df2\u5b8c\u5168\u53ef\u4ee5\u7528\u57fa\u7840\u8bbe\u65bd Kubernetes \u7684\u65b9\u6848\u53bb\u89e3\u51b3\u3002\u867d\u7136\u51fa\u53d1\u70b9\u4e0d\u540c\uff0c\u5bfc\u81f4\u5b83\u4eec\u89e3\u51b3\u95ee\u9898\u7684\u65b9\u5f0f\u548c\u6548\u679c\u5b58\u5728\u5dee\u5f02\uff0c\u4f46\u65e0\u7591\u4e3a\u6211\u4eec\u63d0\u4f9b\u4e86\u4e00\u79cd\u5168\u65b0\u4e14\u66f4\u5177\u524d\u666f\u7684\u89e3\u51b3\u95ee\u9898\u7684\u601d\u8def\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"428\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-261-1024x428.png\" alt=\"\" class=\"wp-image-17910\" style=\"width:550px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-261-1024x428.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-261-300x125.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-261-768x321.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-261-1536x642.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-261-830x347.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-261-230x96.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-261-350x146.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-261-480x201.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-261.png 2028w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>\u5f53\u865a\u62df\u5316\u7684\u57fa\u7840\u8bbe\u65bd\u4ece\u5355\u4e2a\u670d\u52a1\u7684\u5bb9\u5668\u6269\u5c55\u81f3\u7531\u591a\u4e2a\u5bb9\u5668\u6784\u6210\u7684\u670d\u52a1\u96c6\u7fa4\uff0c\u5e76\u5f00\u59cb\u89e3\u51b3\u5206\u5e03\u5f0f\u7684\u95ee\u9898\u3002\u90a3\u4e48\uff0c\u8f6f\u4ef6\u4e0e\u786c\u4ef6\u7684\u754c\u9650\u4fbf\u5f00\u59cb\u6a21\u7cca\u3002\u4e00\u65e6\u865a\u62df\u5316\u7684\u786c\u4ef6\u80fd\u591f\u8ddf\u4e0a\u8f6f\u4ef6\u7684\u7075\u6d3b\u6027\uff0c\u90a3\u4e9b\u4e0e\u4e1a\u52a1\u65e0\u5173\u7684\u6280\u672f\u6027\u95ee\u9898\u4fbf\u6709\u53ef\u80fd\u4ece\u8f6f\u4ef6\u5c42\u9762\u5265\u79bb\uff0c\u5e76\u6084\u65e0\u58f0\u606f\u5730\u89e3\u51b3\u4e8e\u786c\u4ef6\u57fa\u7840\u8bbe\u65bd\u4e4b\u5185\u3002<\/p>\n\n\n\n<p>\u6b64\u5373\u4e3a\u201c\u540e\u5fae\u670d\u52a1\u65f6\u4ee3\u201d\u3002<\/p>\n\n\n\n<p>\u3000<\/p>\n\n\n\n<p><strong>\u540e\u5fae\u670d\u52a1\u65f6\u4ee3\u7684\u4e8c\u6b21\u8fdb\u5316<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>Kubernetes \u7684\u5d1b\u8d77\u6807\u5fd7\u7740\u5fae\u670d\u52a1\u65f6\u4ee3\u7684\u65b0\u7bc7\u7ae0\uff0c\u4f46\u5b83\u5e76\u672a\u80fd\u5b8c\u5168\u89e3\u51b3\u6240\u6709\u7684\u5206\u5e03\u5f0f\u95ee\u9898\u3002\u5c31\u529f\u80fd\u7684\u7075\u6d3b\u6027\u548c\u5f3a\u5927\u6027\u800c\u8a00\uff0cKubernetes \u8fd8\u6bd4\u4e0d\u4e0a\u4e4b\u524d\u7684 Spring Cloud \u65b9\u6848\uff0c\u539f\u56e0\u5728\u4e8e\u67d0\u4e9b\u95ee\u9898\u4f4d\u4e8e\u5e94\u7528\u7cfb\u7edf\u4e0e\u57fa\u7840\u8bbe\u65bd\u7684\u4ea4\u754c\u5904\uff0c\u800c\u5fae\u89c2\u7684\u670d\u52a1\u7ba1\u7406\uff08\u5982\u5355\u4e2a\u8bf7\u6c42\u7684\u6cbb\u7406\uff09\u5e76\u4e0d\u80fd\u5b8c\u5168\u5728\u57fa\u7840\u8bbe\u65bd\u5c42\u9762\u5f97\u5230\u89e3\u51b3\u3002<\/p>\n\n\n\n<p>\u4e3e\u4e2a\u4f8b\u5b50\uff0c\u5982\u56fe 1-21 \u6240\u793a\uff0c\u5047\u8bbe\u5fae\u670d\u52a1 A \u8c03\u7528\u4e86\u5fae\u670d\u52a1 B \u7684\u4e24\u4e2a\u670d\u52a1\uff0c\u5373 B1 \u548c B2\u3002\u82e5 B1 \u6b63\u5e38\u8fd0\u884c\uff0c\u800c B2 \u6301\u7eed\u51fa\u73b0 500 \u9519\u8bef\uff0c\u90a3\u4e48\u5728\u8fbe\u5230\u4e00\u5b9a\u9608\u503c\u540e\uff0c\u5c31\u5e94\u5bf9 B2 \u8fdb\u884c\u7194\u65ad\uff0c\u4ee5\u907f\u514d\u5f15\u53d1\u96ea\u5d29\u6548\u5e94\u3002\u5982\u679c\u4ec5\u5728\u57fa\u7840\u8bbe\u65bd\u5c42\u9762\u5904\u7406\u8fd9\u4e2a\u95ee\u9898\uff0c\u90a3\u5c31\u4f1a\u9677\u5165\u4e24\u96be\u5883\u5730\u201c\u5207\u65ad A \u5230 B \u7684\u7f51\u7edc\u901a\u8def\u4f1a\u5f71\u54cd\u5230 B1 \u7684\u6b63\u5e38\u8fd0\u4f5c\uff0c\u4e0d\u5207\u65ad\u5219\u4f1a\u6301\u7eed\u53d7\u5230 B2 \u9519\u8bef\u7684\u5f71\u54cd\u201d\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"896\" height=\"414\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-262.png\" alt=\"\" class=\"wp-image-17911\" style=\"width:482px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-262.png 896w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-262-300x139.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-262-768x355.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-262-830x384.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-262-230x106.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-262-350x162.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-262-480x222.png 480w\" sizes=\"(max-width: 896px) 100vw, 896px\" \/><\/figure><\/div>\n\n\n<p>\u4e0a\u8ff0\u95ee\u9898\u5728\u4f7f\u7528 Spring Cloud \u7b49\u65b9\u6848\u4e2d\u6bd4\u8f83\u5bb9\u6613\u5904\u7406\uff0c\u65e2\u7136\u662f\u4f7f\u7528\u7a0b\u5e8f\u4ee3\u7801\u6765\u89e3\u51b3\u95ee\u9898\uff0c\u53ea\u8981\u5408\u4e4e\u903b\u8f91\uff0c\u60f3\u8981\u5b9e\u73b0\u4ec0\u4e48\u529f\u80fd\u5c31\u5b9e\u73b0\u4ec0\u4e48\u529f\u80fd\u3002\u4f46\u5bf9\u4e8e Kubernetes\uff0c\u7531\u4e8e\u57fa\u7840\u8bbe\u65bd\u7c92\u5ea6\u66f4\u7c97\u7cd9\uff0c\u901a\u5e38\u53ea\u80fd\u7ba1\u7406\u5230\u5bb9\u5668\u5c42\u9762\uff0c\u5bf9\u5355\u4e2a\u8fdc\u7a0b\u670d\u52a1\u7684\u6709\u6548\u7ba1\u7406\u5c31\u76f8\u5bf9\u56f0\u96be\u3002\u7c7b\u4f3c\u7684\u60c5\u51b5\u4e0d\u4ec5\u4ec5\u5728\u65ad\u8def\u5668\u4e0a\u51fa\u73b0\uff0c\u670d\u52a1\u7684\u76d1\u63a7\u3001\u8ba4\u8bc1\u3001\u6388\u6743\u3001\u5b89\u5168\u3001\u8d1f\u8f7d\u5747\u8861\u7b49\u90fd\u6709\u53ef\u80fd\u9762\u4e34\u7ec6\u5316\u7ba1\u7406\u7684\u9700\u6c42\u3002<\/p>\n\n\n\n<p>\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e00\u7c7b\u95ee\u9898\uff0c\u5fae\u670d\u52a1\u57fa\u7840\u8bbe\u65bd\u5f88\u5feb\u8fdb\u884c\u4e86\u7b2c\u4e8c\u6b21\u8fdb\u5316\uff0c\u5f15\u5165\u4e86\u4eca\u5929\u88ab\u79f0\u4e3a\u201c\u670d\u52a1\u7f51\u683c\u201d\uff08Service Mesh\uff09\u7684\u6a21\u5f0f\u3002<\/p>\n\n\n\n<p>Netflix \u662f\u4e1a\u754c\u5fae\u670d\u52a1\u548c DevOps \u7ec4\u7ec7\u7684\u5148\u9a71\uff0c\u6709\u5927\u89c4\u6a21\u751f\u4ea7\u7ea7\u5fae\u670d\u52a1\u7684\u6210\u529f\u5b9e\u8df5\uff0c\u5e76\u4e3a Spring Cloud Netflix \u793e\u533a\u8d21\u732e\u4e86\u5927\u91cf\u4f18\u79c0\u7684\u5f00\u6e90\u8f6f\u4ef6\uff0c\u4f8b\u5982 Eureka\uff08\u670d\u52a1\u6ce8\u518c\u4e0e\u53d1\u73b0\uff09\u3001Zuul\uff08\u670d\u52a1\u7f51\u5173\uff09\u3001Ribbon\uff08\u8d1f\u8f7d\u5747\u8861\uff09\u3001Hystrix\uff08\u7194\u65ad\u9650\u6d41\uff09\u7b49\u7b49\u3002 <\/p>\n\n\n\n<p>\u3000<\/p>\n\n\n\n<p><strong>\u670d\u52a1\u7f51\u683c<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u670d\u52a1\u7f51\u683c\uff08Service Mesh\uff09\u7684\u6982\u5ff5\u6700\u65e9\u7531 Buoyant \u516c\u53f8\u7684\u521b\u59cb\u4eba William Morgan \u4e8e 2016 \u5e74\u63d0\u51fa\u3002<\/p>\n\n\n\n<p>2017 \u5e74 4 \u6708\uff0c\u8be5\u516c\u53f8\u53d1\u5e03\u4e86\u9996\u4e2a\u670d\u52a1\u7f51\u683c\u4ea7\u54c1 Linkerd\u3002\u540c\u5e74\uff0cMorgan \u7684\u6587\u7ae0\u300aWhat\u2019s a service mesh? And why do I need one?\u300b<sup><a href=\"https:\/\/www.thebyte.com.cn\/architecture\/ServiceMesh.html#footnote1\">[1]<\/a><\/sup>\u5728\u4e92\u8054\u7f51\u4e2d\u5f00\u59cb\u5e7f\u6cdb\u6d41\u4f20\uff0c\u8fd9\u7bc7\u6587\u7ae0\u5185\u7684\u89e3\u8bfb\u88ab\u8ba4\u5b9a\u4e3a\u670d\u52a1\u7f51\u683c\u7684\u6743\u5a01\u5b9a\u4e49\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u670d\u52a1\u7f51\u683c\u7684\u5b9a\u4e49<br><br>\u670d\u52a1\u7f51\u683c\uff08ServiceMesh\uff09\u662f\u4e00\u4e2a\u57fa\u7840\u8bbe\u65bd\u5c42\uff0c\u7528\u4e8e\u5904\u7406\u670d\u52a1\u95f4\u901a\u4fe1\u3002\u4e91\u539f\u751f\u5e94\u7528\u6709\u7740\u590d\u6742\u7684\u670d\u52a1\u62d3\u6251\uff0c\u670d\u52a1\u7f51\u683c\u4fdd\u8bc1\u8bf7\u6c42\u5728\u8fd9\u4e9b\u62d3\u6251\u4e2d\u53ef\u9760\u5730\u7a7f\u68ad\u3002\u5728\u5b9e\u9645\u5e94\u7528\u5f53\u4e2d\uff0c\u670d\u52a1\u7f51\u683c\u901a\u5e38\u662f\u7531\u4e00\u7cfb\u5217\u8f7b\u91cf\u7ea7\u7684\u7f51\u7edc\u4ee3\u7406\u7ec4\u6210\u7684\uff0c\u5b83\u4eec\u4e0e\u5e94\u7528\u7a0b\u5e8f\u90e8\u7f72\u5728\u4e00\u8d77\uff0c\u4f46\u5bf9\u5e94\u7528\u7a0b\u5e8f\u900f\u660e\u3002<\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"619\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-264-1024x619.png\" alt=\"\" class=\"wp-image-17913\" style=\"width:516px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-264-1024x619.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-264-300x181.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-264-768x464.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-264-830x502.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-264-230x139.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-264-350x212.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-264-480x290.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-264.png 1436w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>\u5177\u6709\u901a\u4fe1\u6cbb\u7406\u80fd\u529b\u7684\u4ee3\u7406\u8f6f\u4ef6\u4ee5\u8fb9\u8f66\u5f62\u5f0f\u90e8\u7f72\uff0c\u670d\u52a1\u4e4b\u95f4\u901a\u8fc7\u8fb9\u8f66\u53d1\u73b0\u548c\u8c03\u7528\u76ee\u6807\u670d\u52a1\u3002\u5982\u679c\u6211\u4eec\u628a\u8282\u70b9\u548c\u4e1a\u52a1\u903b\u8f91\u4ece\u89c6\u56fe\u5265\u79bb\uff0c\u8fb9\u8f66\u4e4b\u95f4\u5448\u73b0\u56fe 1-23 \u6240\u793a\u7f51\u7edc\u72b6\u4f9d\u8d56\u5173\u7cfb\uff0c\u670d\u52a1\u7f51\u683c\u7531\u6b64\u5f97\u540d\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"490\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-265-1024x490.png\" alt=\"\" class=\"wp-image-17914\" style=\"width:542px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-265-1024x490.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-265-300x143.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-265-768x367.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-265-1536x734.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-265-830x397.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-265-230x110.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-265-350x167.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-265-480x230.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-265.png 2016w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>\u4e1a\u5185\u7edd\u5927\u90e8\u5206\u670d\u52a1\u7f51\u683c\u4ea7\u54c1\u901a\u5e38\u7531\u201c\u6570\u636e\u5e73\u9762\u201d\u548c\u201c\u63a7\u5236\u5e73\u9762\u201d\u4e24\u90e8\u5206\u7ec4\u6210\uff0c\u4ee5\u670d\u52a1\u7f51\u683c\u7684\u4ee3\u8868\u5b9e\u73b0 Istio \u67b6\u6784\u4e3a\u4f8b\uff0c\u5982\u56fe 1-24 \u6240\u793a\u3002<\/p>\n\n\n\n<ul>\n<li>\u6570\u636e\u5e73\u9762\uff08Data plane\uff09\uff1a\u901a\u5e38\u91c7\u7528\u8f7b\u91cf\u7ea7\u7684\u7f51\u7edc\u4ee3\u7406\uff08\u5982 Envoy\uff09\u4f5c\u4e3a Sidecar\uff0c\u7f51\u7edc\u4ee3\u7406\u8d1f\u8d23\u534f\u8c03\u548c\u63a7\u5236\u670d\u52a1\u4e4b\u95f4\u7684\u901a\u4fe1\u548c\u6d41\u91cf\u5904\u7406\uff0c\u89e3\u51b3\u5fae\u670d\u52a1\u4e4b\u95f4\u670d\u52a1\u7194\u65ad\u3001\u8d1f\u8f7d\u5747\u8861\u3001\u5b89\u5168\u901a\u8baf\u7b49\u95ee\u9898\u3002<\/li>\n\n\n\n<li>\u63a7\u5236\u5e73\u9762\uff08Control plane\uff09\uff1a\u5305\u542b\u591a\u4e2a\u63a7\u5236\u7ec4\u4ef6\uff0c\u5b83\u4eec\u8d1f\u8d23\u914d\u7f6e\u548c\u7ba1\u7406 Sidecar \uff0c\u5e76\u63d0\u4f9b\u670d\u52a1\u53d1\u73b0\uff08Discovery\uff09\u3001\u914d\u7f6e\u7ba1\u7406\uff08Configuration\uff09\u3001\u5b89\u5168\u63a7\u5236\uff08Certificates\uff09\u7b49\u529f\u80fd\u3002<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"730\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-266-1024x730.png\" alt=\"\" class=\"wp-image-17915\" style=\"width:524px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-266-1024x730.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-266-300x214.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-266-768x548.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-266-1536x1095.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-266-2048x1460.png 2048w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-266-830x592.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-266-230x164.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-266-350x250.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-266-480x342.png 480w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c\u5c3d\u7ba1\u670d\u52a1\u7f51\u683c\u7684\u7279\u70b9\u662f Sidecar \u6a21\u5f0f\uff0c\u4f46 Sidecar \u6a21\u5f0f\u5e76\u975e\u670d\u52a1\u7f51\u683c\u4e13\u6709\u3002<\/p>\n\n\n\n<p>Sidecar \u662f\u4e00\u79cd\u5e38\u89c1\u7684\u5bb9\u5668\u8bbe\u8ba1\u6a21\u5f0f\uff0cKubernetes \u7684\u5de5\u4f5c\u8d1f\u8f7d Pod \u5185\u53ef\u914d\u7f6e\u591a\u4e2a\u5bb9\u5668\uff0c\u4e1a\u52a1\u5bb9\u5668\u4e4b\u5916\u7684\u5176\u4ed6\u6240\u6709\u5bb9\u5668\u5747\u53ef\u79f0\u4e3a\u201c\u8fb9\u8f66\u5bb9\u5668\u201d\uff08Sidecar container\uff09\u3002\u5982\u65e5\u5fd7\u6536\u96c6 Sidecar\u3001\u8bf7\u6c42\u4ee3\u7406 Sidecar \u548c\u94fe\u8def\u8ffd\u8e2a Sidecar \u7b49\u7b49\u3002<\/p>\n\n\n\n<p>\u5982\u56fe 1-25 \u6240\u793a\uff0capp-container \u662f\u4e00\u4e2a\u4e3b\u4e1a\u52a1\u5bb9\u5668\uff0clogging-agent \u662f\u4e00\u4e2a\u65e5\u5fd7\u6536\u96c6\u5bb9\u5668\u3002\u4e3b\u4e1a\u52a1\u5bb9\u5668\u5b8c\u5168\u611f\u77e5\u4e0d\u5230 logging-agent \u7684\u5b58\u5728\uff0c\u5b83\u53ea\u8d1f\u8d23\u8f93\u51fa\u65e5\u5fd7\uff0c\u65e0\u9700\u5173\u5fc3\u540e\u7eed\u65e5\u5fd7\u8be5\u600e\u4e48\u5904\u7406\u3002\u4f60\u601d\u8003\u8fd9\u6837\u5f00\u53d1\u4e00\u4e2a\u9ad8\u5185\u805a\u3001\u4f4e\u8026\u5408\u7684\u7cfb\u7edf\u662f\u5426\u66f4\u52a0\u5bb9\u6613\uff1f<\/p>\n\n\n\n<p>\u56fe Kubernetes Pod \u4e2d Sidecar \u5bb9\u5668\u6536\u96c6\u5e94\u7528\u65e5\u5fd7\uff0c\u5e76\u8f6c\u53d1\u81f3\u65e5\u5fd7\u540e\u7aef<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"515\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-267-1024x515.png\" alt=\"\" class=\"wp-image-17916\" style=\"width:592px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-267-1024x515.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-267-300x151.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-267-768x386.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-267-1536x773.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-267-830x418.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-267-230x116.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-267-350x176.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-267-480x242.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-267.png 1896w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>\u81f3\u6b64\uff0c\u76f8\u4fe1\u4f60\u5df2\u7ecf\u6e05\u695a\u670d\u52a1\u7f51\u683c\u4e0d\u662f\u4ec0\u4e48\u9ed1\u79d1\u6280\uff0c\u4e5f\u6ca1\u6709\u4ec0\u4e48\u8000\u773c\u7684\u65b0\u6280\u672f\u3002<\/p>\n\n\n\n<p>\u670d\u52a1\u7f51\u683c\u672c\u8d28\u662f\u901a\u8fc7 iptables \u52ab\u6301\u53d1\u9001\u5230\u5e94\u7528\u5bb9\u5668\u7684\u6d41\u91cf\uff0c\u5c06\u539f\u672c\u5728\u4e1a\u52a1\u5c42\u5904\u7406\u7684\u5206\u5e03\u5f0f\u901a\u4fe1\u6cbb\u7406\u76f8\u5173\u7684\u6280\u672f\u95ee\u9898\uff0c\u4e0b\u6c89\u5230\u7f51\u7edc\u4ee3\u7406\u578b\u8fb9\u8f66\u4e2d\u5904\u7406\uff0c\u5b9e\u73b0\u4e1a\u52a1\u4e0e\u975e\u4e1a\u52a1\u903b\u8f91\u89e3\u8026\u7684\u76ee\u7684\u3002<\/p>\n\n\n\n<p>\u7b14\u8005\u5c06\u5728\u7b2c\u516b\u7ae0\u5b8c\u6574\u4ecb\u7ecd\u670d\u52a1\u7f51\u683c\u6280\u672f\uff0c\u9610\u8ff0\u670d\u52a1\u95f4\u901a\u4fe1\u7684\u6f14\u53d8\u3001\u670d\u52a1\u7f51\u683c\u7684\u751f\u6001\u4ee5\u53ca\u670d\u52a1\u7f51\u683c\u7684\u672a\u6765\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8f6c\u8f7d\uff1ahttps:\/\/www.thebyte.com.cn\/architecture\/MicroService [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[],"_links":{"self":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/17904"}],"collection":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=17904"}],"version-history":[{"count":1,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/17904\/revisions"}],"predecessor-version":[{"id":17917,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/17904\/revisions\/17917"}],"wp:attachment":[{"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=17904"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=17904"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=17904"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}