基于centos7.3以All-in-One 模式ssh免密登录安装 KubeSphere

硬件推荐配置

操作系统

最低配置

Ubuntu 16.04, 18.04

2 核 CPU,4 GB 内存,40 GB 磁盘空间

Debian Buster, Stretch

2 核 CPU,4 GB 内存,40 GB 磁盘空间

CentOS 7.x

2 核 CPU,4 GB 内存,40 GB 磁盘空间

Red Hat Enterprise Linux 7

2 核 CPU,4 GB 内存,40 GB 磁盘空间

SUSE Linux Enterprise Server 15/openSUSE Leap 15.2

2 核 CPU,4 GB 内存,40 GB 磁盘空间

容器引擎支持配置

支持的容器运行时

版本

Docker

19.3.8 +

containerd

最新版

CRI-O(试验版,未经充分测试)

最新版

iSula(试验版,未经充分测试)

最新版

依赖环境要求

依赖项

Kubernetes 版本 ≥ 1.18

Kubernetes 版本 < 1.18

socat

必须

可选但建议

conntrack

必须

可选但建议

ebtables

可选但建议

可选但建议

ipset

可选但建议

可选但建议

title

keywords

description

linkTitle

weight

在 Linux 上以 All-in-One 模式安装 KubeSphere

KubeSphere, Kubernetes, All-in-One, 安装

了解在 Linux 上如何使用最小安装包安装 KubeSphere。本教程为您理解容器平台提供了基础入门知识,为学习以下指南奠定基础。

在 Linux 上以 All-in-One 模式安装 KubeSphere

2100

软件

版本

项目地址

centos

7.3.1611

内核

3.10.0-514.el7.x86_64

ntpdate

4.2.6p5-25.el7.centos.x86_64

yum-utils

1.1.31-54.el7_8

device-mapper-persistent-data

7:1.02.170-6.el7_9.5

lvm2

7:2.02.187-6.el7_9.5

docker-ce

3:20.10.17-3.el7

curl

7.29.0-59.el7_9.1.x86_64

socat

1.7.3.2-2.el7.x86_64

 conntrack

1.4.4-7.el7.x86_64

ebtables

2.0.10-15.el7.x86_64

ipset

6.19-6.el7.x86_64

kubekey

v2.2.1

kubernetes

v1.22.10

kubesphere

v3.3.0

1.环境准备

##关闭防火墙

systemctl stop firewalld && systemctl disable --now firewalld

##关闭seliux

sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

setenforce 0

##禁用swap

swapoff -a

echo "vm.swappiness=0" >> /etc/sysctl.conf

sysctl -p /etc/sysctl.conf

vim /etc/fstab

##内核参数设置

cat > /etc/sysctl.d/k8s.conf << EOF

net.bridge.bridge-nf-call-ip6tables = 1

net.bridge.bridge-nf-call-iptables = 1

net.ipv4.ip_forward = 1

EOF

sysctl --system

##时间同步

yum install -y ntpdate

ntpdate time.windows.com

##检查DNS

cat /etc/resolv.conf
##清空防火墙策略

iptables -F

##配置ssh免登录

ssh-keygen

##重启

reboot

2.安装docker

##安装docker

sudo yum install -y yum-utils device-mapper-persistent-data lvm2

sudo yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

sudo sed -i 's+download.docker.com+mirrors.aliyun.com/docker-ce+' /etc/yum.repos.d/docker-ce.repo

sudo yum makecache fast

sudo yum -y install docker-ce

##配置阿里云容器镜像加速器

mkdir -p /etc/docker

sudo tee /etc/docker/daemon.json <<-'EOF'

{

"registry-mirrors": ["https://hg8sb1a6.mirror.aliyuncs.com"]

}
EOF

##重启docker

systemctl start docker && systemctl enable docker

3.安装curl工具

yum install -y curl

4.安装依赖环境

yum install -y socat conntrack ebtables ipset

5.安装kubekey

export KKZONE=cn

curl -kfL https://get-kk.kubesphere.io | VERSION=v2.2.1 sh -

##授权

chmod +x kk

6.安装kubernetes和kubeSphere

./kk create cluster --with-kubernetes v1.22.10 --with-kubesphere v3.3.0

7.查看集群信息

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

注意!第一次登录管理员用户可以设定自己喜欢的密码!

8.查看集群pod状态

kubectl get pods -A

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

404警告、

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值