CentOS安装 All-in-One 模式安装 KubeSphere

系统 Linux
对于刚接触 KubeSphere 并想快速上手该容器平台的用户,All-in-One 安装模式是最佳的选择,它能够帮助您零配置快速部署 KubeSphere 和 Kubernetes。

[[427426]]

Kubesphere官方文档:

https://kubesphere.com.cn/docs/quick-start/all-in-one-on-linux/

1. 安装CentOS

要把处理器核心数设置在 2以上,这是k8s安装配置要求的

2. 配置 ip

  1. vi /etc/sysconfig/network-scripts/ifcfg-ens33 
  2. ## 简单的就是设置为静态ip 
  3. ONBOOT=yes 

3. 禁用selinux(坑 一)

  1. vi /etc/sysconfig/selinux 
  2. ## 这是设置一个属性为disabled 
  3. SELINUX=disabled 

 配置完之后需要重启 reboot

4. 官网要求

(1)节点必须能够通过 SSH 连接。

(2)节点上可以使用 sudo/curl/openssl 命令。

(3)docker 可以由您自己安装或由 KubeKey 安装。

注意:如果你想离线安装 KubeSphere,请务必提前安装好 docker。

安装要求的依赖

  1. yum install socat conntrack ebtables ipset 

5. 关闭防火墙(坑二)

  1. systemctl stop firewalld.service # 停止 
  2. systemctl disable firewalld.service # 禁用防火墙,下次启动也不会开启 

6. 安装docker(坑三)

  1. # 1. 安装docker 
  2. yum  install docker docker.io 
  3. # 2. 配置docker 源 
  4. vim /etc/docker/daemon.json 
  5.         "registry-mirrors": [ 
  6.                 "https://registry.docker-cn.com" 
  7.         ] 
  8. # 3. 重载docker 
  9. sudo systemctl daemon-reload 
  10. sudo systemctl restart docker 

7. 安装KubeKey

  1. # 先执行以下命令以确保从正确的区域下载 KubeKey 
  2. export KKZONE=cn 
  3. # 执行以下命令下载 KubeKey 
  4. curl -sfL https://get-kk.kubesphere.io | VERSION=v1.0.1 sh - 
  5. # 为kk添加可执行权限 
  6. chmod +x kk 

8. 安装Kubernetes和kubesphere

  1. # 安装 
  2. ./kk create cluster --with-kubernetes v1.17.9 --with-kubesphere v3.0.0 

验证结果

  1. kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f 
  1. ************************************************** 
  2. ##################################################### 
  3. ###              Welcome to KubeSphere!           ### 
  4. ##################################################### 
  5. Console: http://192.168.106.135:30880 
  6. Account: admin 
  7. Password: P@88w0rd 
  8. NOTES: 
  9.   1. After logging into the console, please check the 
  10.      monitoring status of service components in 
  11.      the "Cluster Management". If any service is not 
  12.      ready, please wait patiently until all components 
  13.      are ready. 
  14.   2. Please modify the default password after login. 
  15. ##################################################### 
  16. https://kubesphere.io             2021-08-28 12:20:55 
  17. ##################################################### 

9.登录

CentOS安装 All-in-One 模式安装 KubeSphere

 

责任编辑:姜华 来源: 今日头条
相关推荐

2013-06-09 10:34:24

华为网络规划企业ICT

2010-02-02 13:33:13

互联网

2010-04-08 14:42:32

互联网

2014-08-18 11:15:06

OpenStack

2021-02-06 07:16:33

kubekeykubesphere运维

2012-02-29 21:16:24

用友U8信息化

2010-01-18 15:34:47

互联网

2010-04-13 15:50:36

用友U8 All-in信息化

2012-02-29 19:03:31

用友信息化U8

2010-01-22 17:25:11

互联网

2015-10-14 09:43:09

LinuxMintGate One安装

2009-03-26 17:41:53

2011-02-23 14:38:39

安装CentOS vsftpd

2011-02-24 15:04:58

ProftpdCentos

2010-02-23 14:45:52

CentOS LEMP

2011-02-23 14:38:39

安装CentOS vsftpd

2011-03-02 09:52:03

2010-03-30 15:52:49

CentOS安装

2010-03-23 17:41:09

CentOS安装

2011-03-29 10:22:35

CentOS安装Zabbix
点赞
收藏

51CTO技术栈公众号