阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

CentOS通过 All-in-One 模式安装 KubeSphere技巧

36次阅读
没有评论

共计 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. 登录

CentOS 通过 All-in-One 模式安装 KubeSphere 技巧

阿里云 2 核 2G 服务器 3M 带宽 61 元 1 年,有高配

腾讯云新客低至 82 元 / 年,老客户 99 元 / 年

代金券:在阿里云专用满减优惠券

正文完
星哥说事-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2024-07-25发表,共计1976字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中