kubesphere官网:https://kubesphere.io/docs/advanced-v2.0/zh-CN/introduction/intro/
一、准备环境
1、准备服务器
2、准备nfs存储
// 安装nfs: # yum -y install nfs-utils # vim /etc/exports /opt/kubesphere 192.168.37.0/24(rw,no_root_squash) //启动nfs服务 #systemctl start nfs
二、下载安装kubesphere
1、 离线下载
curl -L https://kubesphere.io/download/offline/advanced-2.0.2 > advanced-2.0.2.tar.gz tar -zxf advanced-2.0.2.tar.gz cd kubesphere-all-offline-advanced-2.0.2/conf
2、 修改配置文件 vars.yml
# vim kubesphere-all-offline-advanced-2.0.2/conf/vars.yml nfs_client_enable: true nfs_client_is_default_class: true nfs_server: 192.168.37.165 nfs_path: /opt/kubesphere local_volume_provisioner_enabled: false local_volume_is_default_class: false
3、修改配置文件hosts.ini
[all] master ansible_connection=local ip=192.168.37.165 ansible_ssh_pass=root node1 ansible_host=192.168.37.166 ip=192.168.37.166 ansible_ssh_pass=root node2 ansible_host=192.168.37.167 ip=192.168.37.167 ansible_ssh_pass=root
[local-registry] master
[kube-master] master [kube-node] node1 node2 [etcd] master
[k8s-cluster:children] kube-node kube-master
4、安装
successsful!
#####################################################
### Welcome to KubeSphere! ###
#####################################################Console: http://192.168.37.165:30880
Account: admin
Password: P@88w0rdNOTE:
1. After log in to console, please verify the
monitoring status of service components in
the "Cluster Status". If the service is not
ready, please wait patiently. You can start
to use when all components are totally ready.
2. Please modify the default password after login.
#####################################################
5、注意
三、测试kubesphere集群
1、web端登陆:
输入“ http://192.168.37.165:30880 ” ,进入登陆界面,
登陆的用户名和密码是成功安装系统时默认给出的
Console: http://192.168.37.165:30880
Account: admin
Password: P@88w0rd
2、进入服务修改登陆密码,测试集群的node是否可用。