导读 对于刚接触 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.登录

原文来自:https://os.51cto.com/art/202110/684751.htm

本文地址:https://www.linuxprobe.com/centos-kubesphere.html编辑:roc_guo,审核员:逄增宝

Linux命令大全:https://www.linuxcool.com/

Linux系统大全:https://www.linuxdown.com/

红帽认证RHCE考试心得:https://www.rhce.net/