{"id":166961,"date":"2020-10-04T15:47:35","date_gmt":"2020-10-04T07:47:35","guid":{"rendered":"http:\/\/4563.org\/?p=166961"},"modified":"2020-10-04T15:47:35","modified_gmt":"2020-10-04T07:47:35","slug":"kubernetes-%e4%b8%8b%e5%a6%82%e4%bd%95%e6%96%b9%e4%be%bf%e5%9c%b0%e8%8e%b7%e5%8f%96%e4%b8%8d%e6%96%ad%e9%87%8d%e5%90%af%e7%9a%84%e6%9c%8d%e5%8a%a1%e7%9a%84%e6%97%a5%e5%bf%97","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=166961","title":{"rendered":"Kubernetes \u4e0b\u5982\u4f55\u65b9\u4fbf\u5730\u83b7\u53d6\u4e0d\u65ad\u91cd\u542f\u7684\u670d\u52a1\u7684\u65e5\u5fd7"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  Kubernetes \u4e0b\u5982\u4f55\u65b9\u4fbf\u5730\u83b7\u53d6\u4e0d\u65ad\u91cd\u542f\u7684\u670d\u52a1\u7684\u65e5\u5fd7               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : feng32 <\/span>  <span><i><\/i> 4<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\">                        \u5728\u4e00\u4e9b\u6761\u4ef6\u4e0b\uff0c\u670d\u52a1\u8fdb\u7a0b\u53ef\u80fd\u4f1a\u5f02\u5e38\u9000\u51fa\u3002\u5728\u4f20\u7edf\u90e8\u7f72\u6a21\u5f0f\u4e0b\uff0c\u9996\u5148\u505a\u7684\u4e00\u4ef6\u4e8b\uff0c\u662f\u767b\u5230\u670d\u52a1\u5668\u4e0a\u770b\u65e5\u5fd7<\/p>\n<p>\u4f46\u662f\u7528\u4e86 Kubernetes\uff0c\u5bb9\u5668\u4f1a\u88ab\u81ea\u52a8\u9500\u6bc1\uff0c\u7136\u540e\u7b49\u5f85\u4e00\u6bb5\u65f6\u95f4\u540e\u518d\u91cd\u5efa\uff0c\u8fd9\u6837\u5c31\u6ca1\u6cd5\u53ca\u65f6\u53d6\u5f97\u65e5\u5fd7\u4e86<\/p>\n<p>\u4e00\u4e2a\u663e\u800c\u6613\u89c1\u7684\u89e3\u51b3\u65b9\u6cd5\uff0c\u662f\u8ba9\u670d\u52a1\u68c0\u6d4b\u673a\u5236\u4e34\u65f6\u5931\u6548\uff0c\u8ba9\u95ee\u9898\u91cd\u73b0\u4e00\u6b21\uff0c\u7b49\u8c03\u8bd5\u548c\u4fee\u590d\u5de5\u4f5c\u5b8c\u6210\u540e\uff0c\u518d\u8ba9\u68c0\u6d4b\u673a\u5236\u91cd\u65b0\u751f\u6548\uff1b\u5f53\u7136\u4e5f\u53ef\u4ee5\u65e5\u5fd7\u4e0a\u4e91\uff0c\u8fd9\u6837\u5b9e\u9645\u4e0a\u5c31\u7ed5\u8fc7\u4e86\u539f\u95ee\u9898<\/p>\n<p>\u8bf7\u95ee\u8fd8\u6709\u4ec0\u4e48\u66f4\u597d\u7684\u89e3\u6cd5\u5417\uff1f      <\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>5<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3685705\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ManjusakaL <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5bb9\u5668\u7684\u8bdd stdout\/stderr \u8f93\u51fa\u7684\u65e5\u5fd7\u53ef\u4ee5\u641c\u96c6\u5230 ELK \u6216\u8005\u5176\u4f59\u540e\u7aef\u5b58\u50a8                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3685706\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : tcxurun <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u53ef\u4ee5\u628a\u65e5\u5fd7\u6302\u8f7d\u5230\u5bbf\u4e3b\u673a                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3685707\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : fuis <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u65e5\u5fd7\u7ba1\u7406\u76f4\u63a5\u4e0a ELK \u3002<br \/>\u201c\u8ba9\u670d\u52a1\u68c0\u6d4b\u673a\u5236\u4e34\u65f6\u5931\u6548\u201d \u53ef\u4ee5\u901a\u8fc7\u4fee\u6539 YAML \u5b9e\u73b0\uff0c\u6bd4\u5982\u8ba9 probes \u8fd4\u56de\u6b63\u5e38\uff0c\u5728 command args \u91cc\u7528 bash -c &#8220;your-service; tail -f \/dev\/null&#8221; \u7b49\u5f85                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3685708\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : joesonw <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5bb9\u5668 runtime \u4f1a\u6709\u65e5\u5fd7\u5440. \u4f8b\u5982 docker, \u53ef\u4ee5 json \u6a21\u5f0f\u5199\u5728\u78c1\u76d8\u91cc, \u6216\u8005\u5230 syslog, journald \u7b49\u7b49.<\/p>\n<p>\u628a docker \u65e5\u5fd7\u6539\u6210 json \u6a21\u5f0f, \u7136\u540e\u7528 daemonSet \u53bb\u91c7\u96c6.                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3685709\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : anubu <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6807\u51c6\u65b9\u6cd5\u5c31\u662f\u501f\u52a9\u65e5\u5fd7\u7cfb\u7edf\u6216\u5176\u4ed6\u65b9\u5f0f\u5bf9\u65e5\u5fd7\u6536\u96c6\u548c\u8f6c\u50a8\uff1b\u4e34\u65f6\u4f7f\u7528\u573a\u666f\uff0c\u5982\u679c\u4e0d\u662f Pod \u91cd\u542f\uff08\u91cd\u5efa\uff09\u800c\u662f Pod \u91cc\u9762\u67d0\u4e00\u4e2a\u5bb9\u5668\u91cd\u542f\uff08\u91cd\u5efa\uff09\uff0c\u53ef\u4ee5\u8bd5\u8bd5 kubectl logs \u547d\u4ee4\u67e5\u770b\uff0ckubectl logs deployment\/nginx -c nginx-1 &#8211;previous                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>Kubernetes \u4e0b\u5982\u4f55\u65b9\u4fbf\u5730&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/166961"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=166961"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/166961\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=166961"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=166961"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=166961"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}