一、环境准备
10.0.0.231 master
10.0.0.232 worker
10.0.0.233 worker
注:因为是个人用于测试,节点较少。若是大规模集群,则根据实际情况改动即可。
二、创建默认动态存储类sc
使用kubectl get sc来查看,准备就绪的默认存储类是 KubeSphere 安装的必要条件
[root@master231 pv,pvc,sc]#kubectl get sc
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
oldboyedu-nfs-sc (default) oldboyedu/linux Delete Immediate false 34m
注:若不为default存储类,则需要修改,创建sc是添加如下字段:
metadata:
annotations:
storageclass.beta.kubernetes.io/is-default-class: "true"
三、下载安装文件
curl -L -O https://github.com/kubesphere/ks-installer/releases/download/v3.4.0/cluster-configuration.yaml
curl -L -O https://github.com/kubesphere/ks-installer/releases/download/v3.4.0/kubesphere-installer.yaml
四、一键安装kubesphere体验版
kubectl apply -f kubesphere-installer.yaml
kubectl apply -f cluster-configuration.yaml
五、查看kubesphere的安装日志
..........
Collecting installation results ...
#####################################################
### Welcome to KubeSphere! ###
#####################################################
Console: http://10.0.0.231:30880
Account: admin
Password: P@88w0rd
NOTES:
1. After you log into the console, please check the
monitoring status of service components in
"Cluster Management". If any service is not
ready, please wait patiently until all components
are up and running.
2. Please change the default password after login.
#####################################################
https://kubesphere.io 2023-11-09 20:31:21
#####################################################
六、访问KubeSphere的WebUI页面即可
Console: http://10.0.0.231:30880
Account: admin
Password: P@88w0rd
七、出现一下页面KubeSphere安装部署成功啦!!!
还不快抢沙发