KubeSphere - One in all
KubeSphere是一个kubernetes(k8s)的的图形管理界面
本文安装例子以: kubesphere: 3.x, docker: 18.09.9
修改机器名称
hostnamectl set-hostname kk
关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
关闭selinux
sed -i 's/enforcing/disabled/' /etc/selinux/config
关闭swap
swapoff -a
# 查看: vi /etc/fstab
# 注释这一行:/mnt/swap swap swap defaults 0 0
free -m #查看swap是否全为0
查看
cat /etc/fstab
vi /etc/fstab
安装kk需要文件
yum install -y socat conntrack ebtables ipset
安装docker
## 卸载
sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine
## 安装docker需要工具
sudo yum install -y yum-utils
## 添加阿里源
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
## 刷新yum缓存
yum makecache fast
## 安装docker
yum install -y docker-ce-18.09.9-3.el7 docker-ce-cli-18.09.9
## 设置启动
systemctl enable docker && systemctl restart docker
## 查看状态
systemctl status docker
## 设置docker镜像
sudo mkdir -p /etc/docker
cat > /etc/docker/daemon.json << EOF
{
"registry-mirrors": ["https://b7x8yy36.mirror.aliyuncs.com"]
}
EOF
## 重启查看状态
systemctl restart docker
systemctl status docker
检查DNS
cat /etc/resolv.conf
安装kube
## 添加yum源
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
EOF
## 缓存
yum makecache fast
## 安装kube
yum install -y kubelet-1.17.9 kubectl-1.17.9
KK
##
curl -sfL https://get-kk.kubesphere.io | VERSION=v1.0.1 sh -
##
chmod +x kk
##
./kk create cluster --with-kubernetes v1.17.9 --with-kubesphere v3.0.0