kubekey离线环境安装部署kubesphere 3.1.0(PDF档)
链接:https://pan.baidu.com/s/1DKGaSKrudVAEnag6QmHcDQ 提取码:1234
No. 操作系统 主机名 IP地址 节点用途
1 Centos7 Node120 192.168.19.120 etcd、master
2 Centos7 Node121 192.168.19.121 work
3 Centos7 Node122 192.168.19.122 work
二、安装环境准备(下载离线安装包、关闭防火墙、selinux)
1、离线安装包百度网盘下载地址(kubesphere离线包和docker registry镜像)
a. kubesphere链接:https://pan.baidu.com/s/1c7zXFqVObDmH5I4KHDklnw 提取码:1234
b. docker registry镜像链接:https://pan.baidu.com/s/1ENP_gRq8Q25N1gGqKI2bPA 提取码:1234
2、关闭selinux、系统防火墙
a.关闭selinux(编辑/etc/selinux/config文件,将SELINUX的值设为disabled)
#vi /etc/selinux/config
#查看SELinux状态:getenforce
b. 关闭防火墙
#systemctl stop firewalld && systemctl disable firewalld && systemctl status firewalld
3、复制安装包到目录并解压
#tar -zxvf kubesphere-all-v3.1.0-offline-linux-amd64.tar.gz
三、离线安装部署kubesphere
1、创建集群配置文件 config-sample.yaml
#./kk create config –with-kubesphere v3.1.0
2、修改 config-sample.yaml 配置文件hosts、roleGroups、registry(privateRegistry: dockerhub.kubekey.local)
3、安装环境初始化
a.执行以下命令对配置文件中所有节点安装依赖
#./kk init os -f config-sample.yaml -s ./dependencies/
b.从kubesphere-images-v3.1.0/registry.tar中导入docker registry镜像
#docker load < registry.tar
c.使用kk创建自签名镜像仓库
#./kk init os -f config-sample.yaml -s ./dependencies/ –add-images-repo
d.使用offline-installation-tool.sh脚本将镜像导入之前准备的镜像仓库中
#./offline-installation-tool.sh -l images-list.txt -d ./kubesphere-images -r dockerhub.kubekey.local
4、部署(同時部署kubernetes、KubeSphere)
#./kk create cluster -f config-sample.yaml
5、启用可插拔组件(平台管理—》自定义资源 CRD—》搜索栏:clusterconfiguration—》编辑配置文件ks-installer)
应用商店:搜索openpitrix,将 enabled 的 false 改为 true
DevOps:搜索devops,将 enabled 的 false 改为 true
日志系统:搜索logging,将 enabled 的 false 改为 true
事件系统:搜索events,将 enabled 的 false 改为 true
告警系统:搜索alerting ,将 enabled 的 false 改为 true
审计日志:搜索auditing,将 enabled 的 false 改为 true
服务网格:搜索servicemesh,将 enabled 的 false 改为 true
网络策略:搜索network.networkpolicy,将 enabled 的 false 改为 true
Metrics Server:搜索metrics_server,将enabled 的 false 改为true
服务拓扑图:搜索network.topology.type,将 network.topology.type 更改为 weave-scope
容器组 IP 池:搜索network,将 network.ippool.type更改为 calico
KubeEdge:搜索kubeedge.enabled,将 false 更改为 true
Remark:建议插件逐个安装,不要同时部署