VM单节点安装部署KubeSphere,做测试、开发环境
下载安装KubeSphere
vm用的是CentOS7镜像,设置静态IP
- 新安装的虚拟机没有vim、wget等命令,安装一下
yum -y install vim*
yum -y install yum-utils
yum -y install wget
- 关闭防火墙
#关闭防火墙
systemctl stop firewalld
#禁止防火墙自启
systemctl disable firewalld
- 关闭selinux、swap
#永久关闭selinux
sed -i 's/enforcing/disabled/' /etc/selinux/config
#永久关闭swap分区:
sed -ri 's/.*swap.*/#&/' /etc/fstab
#重启
reboot
- All-in-One 安装KubeSphere
下载 KubeKey
参考:官网 在 VMware vSphere 安装 KubeSphere
export KKZONE=cn
curl -sfL https://get-kk.kubesphere.io | VERSION=v3.0.7 sh -
chmod +x kk
./kk create cluster --with-kubernetes v1.22.12 --with-kubesphere v3.3.2
- 安装完成
看到这个界面就是安装完成了,可以去浏览器访问
Console: http://192.168.72.132:30880
Account: admin
Password: P@88w0rd
问题:
1. 执行命令下载 KubeKey时没反应。
解决:去下载需要的tar版本然后解压。
kubesphere GitHub
2. [ERRO] k8s: socat is required
只需 yum install -y socat
安装完成再次执行./kk create cluster --with-kubernetes v1.22.12 --with-kubesphere v3.3.2命令