分享免费的编程资源和教程

网站首页 > 技术教程 正文

KubeSphere3.0一体式模式部署至CentOS7

goqiw 2024-10-23 11:43:23 技术教程 19 ℃ 0 评论

本文介绍一体式模式部署KubeSphere3.0,一体式模式安装时最简单、最快速和无障碍配置部署安装,下面是基于CentOS7安装最新的KubeSphere3.0安装介绍。

提前准备

操作系统最小配置CentOS 7.x (64 bit) CPU:2 核, 内存:4 G, 系统盘:100 G

如果你启用了防火墙,则需要按照文档端口要求打开相关端口。可查看下面链接文档介绍:https://kubesphere.com.cn/docs/installing-on-linux/introduction/port-firewall/

或者关闭SELinux和关闭防火墙。

关闭SELinux命令:

# Edit the configuration
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
#restart the system  
reboot
# check SELinux
getenforce

关闭防火墙命令:

#查看防火墙状态
firewall-cmd --state
#停止firewall
systemctl stop firewalld.service
#禁止firewall开机启动
systemctl disable firewalld.service 

更新系统及安装组件:

#更新系统
yum -y update
#wget
yum -y install wget
#安装socat
yum install -y socat
#安装conntrack-tools
yum install conntrack-tools

准备安装包

下载 KubeSphere 3.0 安装包:

#使用以下命令下载KubeKey:
wget -c https://kubesphere.io/download/kubekey-v1.0.0-linux-amd64.tar.gz -O - | tar -xz
#使kk可执行:
chmod +x kk

开始安装部署

KubeSphere 安装过程中将会自动化地进行环境和文件监测、平台依赖软件的安装、Kubernetes 和 etcd 的自动化安装,以及存储的自动化配置,安装成功后可通过 KubeSphere 控制台右上角点击关于查看安装的版本。

###你只需执行一个命令即可进行安装,其具体格式如下所示:
# ./kk create cluster [--with-kubernetes version] [--with-kubesphere version]
#使用下面命令安装KubeSphere的Kubernetes集群,版本供参考:
./kk create cluster --with-kubernetes v1.17.9 --with-kubesphere v3.0.0

执行命令后,您将看到如下表,用于环境检查。

确认相关组织已经安装,输入“yes”继续。

安装验证:

当您看到如下输出时,表示安装完成:

输入以下命令以检查结果:

kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f

输出显示web控制台的IP地址和端口号,默认情况下通过端口号:30880。现在你可以通过 http://IP:30880 地址登录,默认账户和密码(admin/P@88w0rd)。

#####################################################
###              Welcome to KubeSphere!           ###
#####################################################

Console: http://192.168.1.201: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             2020-10-19 13:35:49
#####################################################

界面预览

安装成功后,浏览器访问对应的 URL,如 http://{$IP}:30880,即可进入 KubeSphere 登录界面,可使用默认的用户名和密码登录 KubeSphere 控制台体验,登录后请立即修改默认密码。如下图所示:

Tags:

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表