共计 1976 个字符,预计需要花费 5 分钟才能阅读完成。
导读 | 对于刚接触 KubeSphere 并想快速上手该容器平台的用户,All-in-One 安装模式是最佳的选择,它能够帮助您零配置快速部署 KubeSphere 和 Kubernetes。 |
1. 安装 CentOS
要把处理器核心数设置在 2 以上,这是 k8s 安装配置要求的
2. 配置 ip
vi /etc/sysconfig/network-scripts/ifcfg-ens33 | |
## 简单的就是设置为静态 ip | |
ONBOOT=yes |
3. 禁用 selinux(坑 一)
vi /etc/sysconfig/selinux | |
## 这是设置一个属性为 disabled | |
SELINUX=disabled |
配置完之后需要重启 reboot
4. 官网要求
(1) 节点必须能够通过 SSH 连接。
(2) 节点上可以使用 sudo/curl/openssl 命令。
(3)docker 可以由您自己安装或由 KubeKey 安装。
注意:如果你想离线安装 KubeSphere,请务必提前安装好 docker。
安装要求的依赖
yum install socat conntrack ebtables ipset
5. 关闭防火墙 (坑二)
systemctl stop firewalld.service # 停止 | |
systemctl disable firewalld.service # 禁用防火墙,下次启动也不会开启 |
6. 安装 docker(坑三)
# 安装 docker | |
yum install docker docker.io | |
#配置 docker 源 | |
vim /etc/docker/daemon.json | |
{ | |
"registry-mirrors": ["https://registry.docker-cn.com"] | |
} | |
#重载 docker | |
sudo systemctl daemon-reload | |
sudo systemctl restart docker |
7. 安装 KubeKey
# 先执行以下命令以确保从正确的区域下载 KubeKey | |
export KKZONE=cn | |
# 执行以下命令下载 KubeKey | |
curl -sfL https://get-kk.kubesphere.io | VERSION=v1.0.1 sh - | |
# 为 kk 添加可执行权限 | |
chmod +x kk |
8. 安装 Kubernetes 和 kubesphere
./kk create cluster --with-kubernetes v1.17.9 --with-kubesphere v3.0.0 |
验证结果
kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f | |
************************************************** | |
##################################################### | |
### Welcome to KubeSphere! ### | |
##################################################### | |
Console: http://192.168.106.135:30880 | |
Account: admin | |
Password: P@88w0rd | |
NOTES:1. After logging into the console, please check the | |
monitoring status of service components in | |
the "Cluster Management". If any service is not | |
ready, please wait patiently until all components | |
are ready. | |
2. Please modify the default password after login. | |
##################################################### | |
https://kubesphere.io 2021-08-28 12:20:55 | |
##################################################### |
9. 登录
正文完
星哥玩云-微信公众号
