{"id":228395,"date":"2021-10-21T09:29:26","date_gmt":"2021-10-21T01:29:26","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=228395"},"modified":"2021-10-14T19:30:05","modified_gmt":"2021-10-14T11:30:05","slug":"centos-kubesphere","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/centos-kubesphere.html","title":{"rendered":"CentOS\u901a\u8fc7 All-in-One \u6a21\u5f0f\u5b89\u88c5 KubeSphere\u6280\u5de7"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u5bf9\u4e8e\u521a\u63a5\u89e6 KubeSphere \u5e76\u60f3\u5feb\u901f\u4e0a\u624b\u8be5\u5bb9\u5668\u5e73\u53f0\u7684\u7528\u6237\uff0cAll-in-One \u5b89\u88c5\u6a21\u5f0f\u662f\u6700\u4f73\u7684\u9009\u62e9\uff0c\u5b83\u80fd\u591f\u5e2e\u52a9\u60a8\u96f6\u914d\u7f6e\u5feb\u901f\u90e8\u7f72 KubeSphere \u548c Kubernetes\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
1. \u5b89\u88c5CentOS<\/strong><\/div>\n

\u8981\u628a\u5904\u7406\u5668\u6838\u5fc3\u6570\u8bbe\u7f6e\u5728 2\u4ee5\u4e0a\uff0c\u8fd9\u662fk8s\u5b89\u88c5\u914d\u7f6e\u8981\u6c42\u7684<\/p>\n

2. \u914d\u7f6e ip<\/strong><\/div>\n
vi\u00a0\/etc\/sysconfig\/network-scripts\/ifcfg-ens33\r\n##\u00a0\u7b80\u5355\u7684\u5c31\u662f\u8bbe\u7f6e\u4e3a\u9759\u6001ip\r\nONBOOT=yes<\/pre>\n
3. \u7981\u7528selinux(\u5751 \u4e00)<\/strong><\/div>\n
vi\u00a0\/etc\/sysconfig\/selinux\r\n##\u00a0\u8fd9\u662f\u8bbe\u7f6e\u4e00\u4e2a\u5c5e\u6027\u4e3adisabled\r\nSELINUX=disabled<\/pre>\n

\u914d\u7f6e\u5b8c\u4e4b\u540e\u9700\u8981\u91cd\u542f reboot<\/p>\n

4. \u5b98\u7f51\u8981\u6c42<\/strong><\/div>\n

(1)\u8282\u70b9\u5fc5\u987b\u80fd\u591f\u901a\u8fc7 SSH \u8fde\u63a5\u3002<\/p>\n

(2)\u8282\u70b9\u4e0a\u53ef\u4ee5\u4f7f\u7528 sudo\/curl\/openssl \u547d\u4ee4\u3002<\/p>\n

(3)docker \u53ef\u4ee5\u7531\u60a8\u81ea\u5df1\u5b89\u88c5\u6216\u7531 KubeKey \u5b89\u88c5\u3002<\/p>\n

\u6ce8\u610f\uff1a\u5982\u679c\u4f60\u60f3\u79bb\u7ebf\u5b89\u88c5 KubeSphere\uff0c\u8bf7\u52a1\u5fc5\u63d0\u524d\u5b89\u88c5\u597d docker\u3002<\/p>\n

\u5b89\u88c5\u8981\u6c42\u7684\u4f9d\u8d56<\/strong><\/span><\/div>\n
yum\u00a0install\u00a0socat\u00a0conntrack\u00a0ebtables\u00a0ipset<\/pre>\n
5. \u5173\u95ed\u9632\u706b\u5899(\u5751\u4e8c)<\/strong><\/div>\n
systemctl\u00a0stop\u00a0firewalld.service\u00a0#\u00a0\u505c\u6b62\r\nsystemctl\u00a0disable\u00a0firewalld.service\u00a0#\u00a0\u7981\u7528\u9632\u706b\u5899\uff0c\u4e0b\u6b21\u542f\u52a8\u4e5f\u4e0d\u4f1a\u5f00\u542f<\/pre>\n
6. \u5b89\u88c5docker(\u5751\u4e09)<\/strong><\/div>\n
# \u5b89\u88c5docker\r\nyum\u00a0\u00a0install\u00a0docker\u00a0docker.io\r\n#\u914d\u7f6edocker \u6e90\r\nvim\u00a0\/etc\/docker\/daemon.json\r\n{\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"registry-mirrors\":\u00a0[\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"https:\/\/registry.docker-cn.com\"\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0]\r\n}\r\n#\u91cd\u8f7ddocker\r\nsudo\u00a0systemctl\u00a0daemon-reload\r\nsudo\u00a0systemctl\u00a0restart\u00a0docker<\/pre>\n
7. \u5b89\u88c5KubeKey<\/strong><\/div>\n
#\u00a0\u5148\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u786e\u4fdd\u4ece\u6b63\u786e\u7684\u533a\u57df\u4e0b\u8f7d\u00a0KubeKey\r\nexport\u00a0KKZONE=cn\r\n#\u00a0\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u4e0b\u8f7d\u00a0KubeKey\r\ncurl\u00a0-sfL\u00a0https:\/\/get-kk.kubesphere.io\u00a0|\u00a0VERSION=v1.0.1\u00a0sh\u00a0-\r\n#\u00a0\u4e3akk\u6dfb\u52a0\u53ef\u6267\u884c\u6743\u9650\r\nchmod\u00a0+x\u00a0kk<\/pre>\n
8. \u5b89\u88c5Kubernetes\u548ckubesphere<\/strong><\/div>\n
#\u00a0\u5b89\u88c5\r\n.\/kk\u00a0create\u00a0cluster\u00a0--with-kubernetes\u00a0v1.17.9\u00a0--with-kubesphere\u00a0v3.0.0<\/pre>\n
\u9a8c\u8bc1\u7ed3\u679c<\/strong><\/span><\/div>\n
kubectl\u00a0logs\u00a0-n\u00a0kubesphere-system\u00a0$(kubectl\u00a0get\u00a0pod\u00a0-n\u00a0kubesphere-system\u00a0-l\u00a0app=ks-install\u00a0-o\u00a0jsonpath='{.items[0].metadata.name}')\u00a0-f\r\n**************************************************\r\n#####################################################\r\n###\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0Welcome\u00a0to\u00a0KubeSphere!\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0###\r\n#####################################################\r\nConsole:\u00a0http:\/\/192.168.106.135:30880\r\nAccount:\u00a0admin\r\nPassword:\u00a0P@88w0rd\r\nNOTES\uff1a\r\n\u00a0\u00a01.\u00a0After\u00a0logging\u00a0into\u00a0the\u00a0console,\u00a0please\u00a0check\u00a0the\r\n\u00a0\u00a0\u00a0\u00a0\u00a0monitoring\u00a0status\u00a0of\u00a0service\u00a0components\u00a0in\r\n\u00a0\u00a0\u00a0\u00a0\u00a0the\u00a0\"Cluster\u00a0Management\".\u00a0If\u00a0any\u00a0service\u00a0is\u00a0not\r\n\u00a0\u00a0\u00a0\u00a0\u00a0ready,\u00a0please\u00a0wait\u00a0patiently\u00a0until\u00a0all\u00a0components\r\n\u00a0\u00a0\u00a0\u00a0\u00a0are\u00a0ready.\r\n\u00a0\u00a02.\u00a0Please\u00a0modify\u00a0the\u00a0default\u00a0password\u00a0after\u00a0login.\r\n#####################################################\r\nhttps:\/\/kubesphere.io\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a02021-08-28\u00a012:20:55\r\n#####################################################<\/pre>\n
9.\u767b\u5f55<\/strong><\/div>\n

\"\"<\/p>\n","protected":false},"excerpt":{"rendered":"

\u8981\u628a\u5904\u7406\u5668\u6838\u5fc3\u6570\u8bbe\u7f6e\u5728 2\u4ee5\u4e0a\uff0c\u8fd9\u662fk8s\u5b89\u88c5\u914d\u7f6e\u8981\u6c42\u7684 vi\u00a0\/etc\/sysconfig\/network- […]<\/p>\n","protected":false},"author":323,"featured_media":176397,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-228395","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/228395","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/323"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=228395"}],"version-history":[{"count":6,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/228395\/revisions"}],"predecessor-version":[{"id":228411,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/228395\/revisions\/228411"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/176397"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=228395"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=228395"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=228395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}