0x00_kubevsphere_单机部署

# 
systemctl disable firewalld && systemctl stop firewalld  
# 
sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config
setenforce 0
#
swapoff -a  
sed -i 's$/dev/mapper/centos-swap$#/dev/mapper/centos-swap$g' /etc/fstab 
echo "vm.swappiness=0" >> /etc/sysctl.conf              
sysctl -p /etc/sysctl.conf
# 
timedatectl set-timezone Asia/Shanghai
yum install -y chrony
sed -i.bak '3,6d' /etc/chrony.conf 
sed -i '3cserver ntp1.aliyun.com iburst' /etc/chrony.conf
systemctl enable --now chronyd
# 
sudo yum remove docker \
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-engine -y
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
sudo yum makecache fast
yum -y install docker-ce-18.09.9-3.el7 docker-ce-cli-18.09.9-3.el7
sudo systemctl enable docker && systemctl start docker
sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
    "registry-mirrors": [
        "http://hub-mirror.c.163.com",
        "https://docker.mirrors.ustc.edu.cn",
    ]
}
EOF
sudo systemctl restart docker
#
yum install -y ebtables socat ipset conntrack
#
cd ~
export KKZONE=cn
curl -sfL https://get-kk.kubesphere.io | VERSION=v3.0.2 sh -
chmod +x kk
mv kk /usr/local/sbin/
./kk create cluster --with-kubernetes v1.22.12 --with-kubesphere v3.3.1
#
kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l 'app in (ks-install, ks-installer)' -o jsonpath='{.items[0].metadata.name}') -f

posted @ 2023-01-18 13:25  自动侠  阅读(70)  评论(0编辑  收藏  举报