栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

Linux k8s Kubernetes All-in-One 模式安装 KubeSphere 详细教程

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Linux k8s Kubernetes All-in-One 模式安装 KubeSphere 详细教程

Linux k8s Kubernetes All-in-One 模式安装 KubeSphere
  • 如果有docker则执行,无则直接跳过此步骤
  • 安装KubeKey
  • 开始安装
  • 管理界面

如果有docker则执行,无则直接跳过此步骤

docker加速配置

创建docker配置文件:sudo mkdir -p /etc/docker

文件内容获取:https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors
加载配置文件:sudo systemctl daemon-reload

重启docker:sudo systemctl restart docker

安装KubeKey

如果您能正常访问 GitHub执行一下命令

# 执行以下命令下载 KubeKey。
curl -sfL https://get-kk.kubesphere.io | VERSION=v2.0.0 sh -

Googleapis如果您访问 GitHub/Googleapis 受限 执行一下命令

# 先执行以下命令以确保您从正确的区域下载 KubeKey
export KKZONE=cn

# 执行以下命令下载 KubeKey。
curl -sfL https://get-kk.kubesphere.io | VERSION=v2.0.0 sh -

为 kk 添加可执行权限:

chmod +x kk
开始安装

只需执行一个命令即可进行安装

./kk create cluster [--with-kubernetes version] [--with-kubesphere version]

若要同时安装 Kubernetes 和 KubeSphere,可参考以下示例命令:

./kk create cluster --with-kubernetes v1.21.5 --with-kubesphere v3.2.1
  • 如果您在这一步的命令中不添加标志 --with-kubesphere,则不会部署 KubeSphere,KubeKey 将只安装 Kubernetes。如果您添加标志 --with-kubesphere 时不指定 KubeSphere 版本,则会安装最新版本的 KubeSphere。

安装过程输入yes

安装过程出现了一下错误

  • 问题1找了很久的原因,发现是docker版本导致的,卸载docker重新安装KubeSphere 就可以,如果没有docker自动安装
  • 问题2
    如果出现:start etcd failed: Failed to exec command: sudo -E /bin/bash -c "systemctl daemon-reload && systemct******
    解决办法:
# 关闭防火墙  所有节点

 systemctl stop firewalld && systemctl disable firewalld

# 重置iptables  所有节点

 iptables -F && iptables -X && iptables -F -t nat && iptables -X -t nat && iptables -P FORWARD ACCEPT

# 停掉原有的etcd 所有节点

systemctl stop etcd

#然后重新启动ectd 所有节点  一个节点启动完 在启动另一个节点

systemctl daemon-reload && systemctl enable etcd && systemctl restart etcd

 

#然后查看状态 显示running 代表启动成功
# 则继续重新安装此命令

安装完成:

管理界面



以上就完成啦

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/961958.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号