{"id":177242,"date":"2020-10-25T17:58:52","date_gmt":"2020-10-25T09:58:52","guid":{"rendered":"http:\/\/4563.org\/?p=177242"},"modified":"2020-10-25T17:58:52","modified_gmt":"2020-10-25T09:58:52","slug":"%e5%9c%a8%e6%8e%a8%e8%8d%90%e4%b8%80%e4%b8%aa%e5%b7%a5%e5%85%b7%ef%bc%9a%e4%bd%bf%e7%94%a8-kainstall-%e5%b7%a5%e5%85%b7%e4%b8%80%e9%94%ae%e9%83%a8%e7%bd%b2-kubernetes-%e9%ab%98%e5%8f%af%e7%94%a8","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=177242","title":{"rendered":"\u5728\u63a8\u8350\u4e00\u4e2a\u5de5\u5177\uff1a\u4f7f\u7528 kainstall \u5de5\u5177\u4e00\u952e\u90e8\u7f72 kubernetes \u9ad8\u53ef\u7528\u96c6\u7fa4"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u5728\u63a8\u8350\u4e00\u4e2a\u5de5\u5177\uff1a\u4f7f\u7528 kainstall \u5de5\u5177\u4e00\u952e\u90e8\u7f72 kubernetes \u9ad8\u53ef\u7528\u96c6\u7fa4               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lework1234 <\/span>  <span><i><\/i> 2<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<h1>\u4ecb\u7ecd<\/h1>\n<p> <\/p>\n<p>kainstall = kubeadm install kubernetes<\/p>\n<p>\u4f7f\u7528 shell \u811a\u672c, \u57fa\u4e8e kubeadm \u4e00\u952e\u90e8\u7f72 kubernetes \u96c6\u7fa4<\/p>\n<p>https:\/\/github.com\/lework\/kainstall<\/p>\n<h2>\u4e3a\u4ec0\u4e48\uff1f<\/h2>\n<p><strong>\u4e3a\u4ec0\u4e48\u8981\u641e\u8fd9\u4e2a\uff1f Ansible PlayBook \u4e0d\u597d\u4e48\uff1f<\/strong><\/p>\n<p><strong>\u56e0\u4e3a\u61d2<\/strong>\uff0cAnsible PlayBook \u7f16\u6392\u662f\u975e\u5e38\u7ed9\u529b\u7684\uff0c\u4e0d\u8fc7\u9700\u8981\u5b89\u88c5 Python \u548c Ansible, \u4e14\u9700\u8981\u4e0b\u8f7d\u591a\u4e2a yaml \u6587\u4ef6 \u3002<strong>\u56e0\u4e3a\u61d2<\/strong>\uff0c\u6211\u60f3\u8981\u4e2a\u66f4\u7b80\u5355\u7684\u65b9\u5f0f\u6765<strong>\u5feb\u901f\u90e8\u7f72<\/strong>\u4e00\u4e2a\u5206\u5e03\u5f0f\u7684 <strong>Kubernetes HA<\/strong> \u96c6\u7fa4\uff0c \u4f7f\u7528 <strong>shell<\/strong> \u811a\u672c\u53ef\u4ee5\u4e0d\u501f\u52a9\u5916\u529b\u76f4\u63a5\u5728\u670d\u52a1\u5668\u4e0a\u8fd0\u884c\uff0c\u7701\u65f6\u7701\u529b\u3002 \u5e76\u4e14 shell \u811a\u672c\u53ea\u6709\u4e00\u4e2a\u6587\u4ef6\uff0c\u6587\u4ef6\u5927\u5c0f<strong>\u4e0d\u5230 100 KB<\/strong>\uff0c\u975e\u5e38\u5c0f\u5de7\uff0c\u53ef\u4ee5\u5b9e\u73b0\u4e00\u6761\u547d\u4ee4\u5b89\u88c5\u96c6\u7fa4\u7684\u8d85\u5feb\u4f53\u9a8c\uff0c\u800c\u4e14\u914d\u5408<strong>\u79bb\u7ebf\u5b89\u88c5\u5305<\/strong>\uff0c\u53ef\u4ee5\u5728\u4e0d\u8054\u7f51\u7684\u73af\u5883\u4e0b\u5b89\u88c5\u96c6\u7fa4\uff0c\u8fd9\u4f53\u9a8c\u771f\u7684<strong>\u975e\u5e38\u723d<\/strong>\u554a\u3002<\/p>\n<h2>\u529f\u80fd<\/h2>\n<ul>\n<li>\u670d\u52a1\u5668\u521d\u59cb\u5316\u3002\n<ul>\n<li>\u5173\u95ed <code>selinux<\/code><\/li>\n<li>\u5173\u95ed <code>swap<\/code><\/li>\n<li>\u5173\u95ed <code>firewalld<\/code><\/li>\n<li>\u5173\u95ed\u5927\u5185\u5b58\u9875<\/li>\n<li>\u914d\u7f6e <code>epel<\/code> \u6e90<\/li>\n<li>\u4fee\u6539 <code>limits<\/code><\/li>\n<li>\u914d\u7f6e\u5185\u6838\u53c2\u6570<\/li>\n<li>\u914d\u7f6e <code>history<\/code> \u8bb0\u5f55<\/li>\n<li>\u914d\u7f6e <code>journal<\/code> \u65e5\u5fd7<\/li>\n<li>\u914d\u7f6e <code>chrony<\/code>\u65f6\u95f4\u540c\u6b65<\/li>\n<li>\u5b89\u88c5 <code>ipvs<\/code> \u6a21\u5757<\/li>\n<li>\u66f4\u65b0\u5185\u6838<\/li>\n<\/ul>\n<\/li>\n<li>\u5b89\u88c5<code>docker<\/code>, <code>kube<\/code>\u7ec4\u4ef6\u3002<\/li>\n<li>\u521d\u59cb\u5316<code>kubernetes<\/code>\u96c6\u7fa4,\u4ee5\u53ca\u589e\u52a0\u6216\u5220\u9664\u8282\u70b9\u3002<\/li>\n<li>\u5b89\u88c5<code>ingress<\/code>\u7ec4\u4ef6\uff0c\u53ef\u9009<code>nginx<\/code>\uff0c<code>traefik<\/code>\u3002<\/li>\n<li>\u5b89\u88c5<code>network<\/code>\u7ec4\u4ef6\uff0c\u53ef\u9009<code>flannel<\/code>\uff0c<code>calico<\/code>\uff0c \u9700\u5728\u521d\u59cb\u5316\u65f6\u6307\u5b9a\u3002<\/li>\n<li>\u5b89\u88c5<code>monitor<\/code>\u7ec4\u4ef6\uff0c\u53ef\u9009<code>prometheus<\/code>\u3002<\/li>\n<li>\u5b89\u88c5<code>log<\/code>\u7ec4\u4ef6\uff0c\u53ef\u9009<code>elasticsearch<\/code>\u3002<\/li>\n<li>\u5b89\u88c5<code>storage<\/code>\u7ec4\u4ef6\uff0c\u53ef\u9009<code>rook<\/code>\uff0c<code>longhorn<\/code>\u3002<\/li>\n<li>\u5b89\u88c5<code>web ui<\/code>\u7ec4\u4ef6\uff0c\u53ef\u9009<code>dashboard<\/code>, <code>kubesphere<\/code>\u3002<\/li>\n<li>\u5347\u7ea7\u5230<code>kubernetes<\/code>\u6307\u5b9a\u7248\u672c\u3002<\/li>\n<li>\u66f4\u65b0\u96c6\u7fa4\u8bc1\u4e66\u3002<\/li>\n<li>\u6dfb\u52a0\u8fd0\u7ef4\u64cd\u4f5c\uff0c\u5982\u5907\u4efd etcd \u5feb\u7167\u3002<\/li>\n<li>\u652f\u6301<strong>\u79bb\u7ebf\u90e8\u7f72<\/strong>\u3002<\/li>\n<li>\u652f\u6301<strong>sudo \u7279\u6743<\/strong>\u3002<\/li>\n<li>\u652f\u6301<strong>10 \u5e74\u8bc1\u4e66\u671f\u9650<\/strong>\u3002<\/li>\n<li>\u652f\u6301<strong>\u73af\u5883\u53d8\u91cf\u8d4b\u503c<\/strong>\u3002<\/li>\n<\/ul>\n<h2>\u4e00\u952e\u521d\u59cb\u5316<\/h2>\n<pre><code>bash -c \"$(curl -sSL https:\/\/cdn.jsdelivr.net\/gh\/lework\/kainstall\/kainstall.sh)\"     - init    --master 192.168.77.130,192.168.77.131,192.168.77.132    --worker 192.168.77.133,192.168.77.134    --user root    --password 123456    --port 22    --version 1.19.3 <\/code><\/pre>\n<p>\u66f4\u591a\u64cd\u4f5c\u89c1\uff1a kainstall \u4ed3\u5e93<\/p>\n<h2>\u79bb\u7ebf\u90e8\u7f72<\/h2>\n<p>wget http:\/\/kainstall.oss-cn-shanghai.aliyuncs.com\/1.19.3\/centos7.tgz<\/p>\n<pre><code>bash -c \"$(curl -sSL https:\/\/cdn.jsdelivr.net\/gh\/lework\/kainstall\/kainstall.sh)\"     - init    --master 192.168.77.130,192.168.77.131,192.168.77.132    --worker 192.168.77.133,192.168.77.134    --user root    --password 123456    --port 22    --version 1.19.3    --offline-file centos7.tgz  <\/code><\/pre>\n<p>\u66f4\u591a\u79bb\u7ebf\u5305\uff1a kainstall-offline \u4ed3\u5e93<\/p>\n<h2>\u8054\u7cfb<\/h2>\n<p>\u521b\u5efa\u4e86\u4e00\u4e2a QQ \u7fa4 467645743 \u5927\u5bb6\u6709\u95ee\u9898\u7684\u53ef\u4ee5\u52a0\u8fdb\u6765\u3002<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>6<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3921660\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : julyclyde <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u73b0\u5728\u5b89\u88c5 kubernetes \u7684\u65b9\u6cd5\u6709\u70b9\u8fc7\u4efd\u591a\u4e86<br \/>\u6709\u5fc5\u8981\u91cd\u590d\u53d1\u660e\u8f6e\u5b50\u5417                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3921661\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : panzhc <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u57fa\u4e8e\u811a\u672c\u7684\u65b9\u5f0f\u633a\u597d\u7684\uff0c\u52a0\u6cb9\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3921662\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : liyongjian5179 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e4b\u524d\u641e\u7684 ansible \u7684\uff0c\u6709\u5174\u8da3\u53ef\u4ee5\u8bd5\u8bd5\uff0c\u4e8c\u8fdb\u5236\u5f04\u7684 https:\/\/github.com\/liyongjian5179\/k8s-ansible                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3921663\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : lework1234 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @liyongjian5179 \u8fd9\u4e2a\u6211\u4e5f\u641e\u8fc7\uff0c\u4e0a\u9762\u4e5f\u8bf4\u4e86\u4e3a\u5565\u4e0d\u7528 ansible \u4e86\u3002<br \/>@julyclyde \u54c8\u54c8\uff0c\u5174\u8da3\u5bfc\u5411\uff0c\u5de5\u5177\u591a\u4e86\u610f\u5473\u7740\u751f\u6001\u597d\u554a\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3921664\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : liyongjian5179 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @lework1234 \u5bf9\u7684\uff0c\u9002\u5408\u81ea\u5df1\u7684\u624d\u662f\u6700\u597d\u7684\uff0c\u5f53\u65f6\u4e5f\u662f\u4e3a\u4e86\u5b66 ansible \u624d\u505a\u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3921665\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : firefox12 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u642d\u8f66<\/p>\n<p>golang \u5199\u7684 \u4e00\u952e\u642d\u5efa k8s \u96c6\u7fa4\u7684\u5de5\u5177\uff0c\u652f\u6301\u4e09\u8282\u70b9\u9ad8\u53ef\u7528\u96c6\u7fa4\uff0c\u6240\u6709\u955c\u50cf\u79bb\u7ebf\u5b89\u88c5\u3002\u65e0\u9700\u7ffb\u5899\uff0c100% \u6210\u529f.<\/p>\n<p>\u5b89\u88c5\u7684\u5c0f\u89c6\u9891\uff0c \u57fa\u672c\u5c31\u662f\u79d2\u7ea7\u5b89\u88c5\u3002<\/p>\n<p>http:\/\/www.k8seasy.com\/fast.gif<\/p>\n<p>![k8seasy]( http:\/\/www.k8seasy.com\/fast.gif)<\/p>\n<p>https:\/\/github.com\/xiaojiaqi\/k8seasy_release_page                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u63a8\u8350\u4e00\u4e2a\u5de5\u5177\uff1a\u4f7f\u7528 kainst&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\/177242"}],"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=177242"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/177242\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=177242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=177242"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=177242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}