美文网首页
使用KubeKey安装kubesphere 3.0.0

使用KubeKey安装kubesphere 3.0.0

作者: 求索 | 来源:发表于2020-09-23 00:04 被阅读0次

kubesphere3独立安装

使用独立linux电脑 安装 kubesphere 3.0.0体验产品

准备电脑

  • 禁用防火墙或者配置开启如下端口

    <table><thead><tr><th>Service</th><th>Protocol</th><th>Action</th><th>Start Port</th><th>End Port</th><th>Notes</th></tr></thead><tbody><tr><td>ssh</td><td>TCP</td><td>allow</td><td>22</td><td></td><td></td></tr><tr><td>etcd</td><td>TCP</td><td>allow</td><td>2379</td><td>2380</td><td></td></tr><tr><td>apiserver</td><td>TCP</td><td>allow</td><td>6443</td><td></td><td></td></tr><tr><td>calico</td><td>TCP</td><td>allow</td><td>9099</td><td>9100</td><td></td></tr><tr><td>bgp</td><td>TCP</td><td>allow</td><td>179</td><td></td><td></td></tr><tr><td>nodeport</td><td>TCP</td><td>allow</td><td>30000</td><td>32767</td><td></td></tr><tr><td>master</td><td>TCP</td><td>allow</td><td>10250</td><td>10258</td><td></td></tr><tr><td>dns</td><td>TCP</td><td>allow</td><td>53</td><td></td><td></td></tr><tr><td>dns</td><td>UDP</td><td>allow</td><td>53</td><td></td><td></td></tr><tr><td>local-registry</td><td>TCP</td><td>allow</td><td>5000</td><td></td><td>For offline environment</td></tr><tr><td>local-apt</td><td>TCP</td><td>allow</td><td>5080</td><td></td><td>For offline environment</td></tr><tr><td>rpcbind</td><td>TCP</td><td>allow</td><td>111</td><td></td><td>Required if NFS is used</td></tr><tr><td>ipip</td><td>IPENCAP / IPIP</td><td>allow</td><td></td><td></td><td>Calico needs to allow the ipip protocol</td></tr></tbody></table>

  • CentOS 7.x

    # uname -a
    Linux centosmini 3.10.0-1127.19.1.el7.x86_64 #
    
  • 硬件要求

    CPU: 2 Cores, Memory: 4 G, Disk Space: 40 G
    
  • 安装容器

    - 设置containerd.io源 
    

    wget https://download.docker.com/linux/centos/7/x86_64/edge/Packages/containerd.io-1.2.6-3.3.el7.x86_64.rpm
    yum install containerd.io-1.2.6-3.3.el7.x86_64.rpm

  • 安装docker

    yum install -y yum-utils device-mapper-persistent-data lvm2
    yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
    yum -y install docker-ce
    
  • 设置镜像

    sudo mkdir -p /etc/docker 
    # 设置镜像
    cat <<EOF > /etc/docker/daemon.json
    {
    "exec-opts":["native.cgroupdriver=systemd"],   
    "log-driver": "json-file",
        "log-opts": {
        "max-size": "100m"
     },
    "storage-driver": "overlay2",
    "storage-opts": [
        "overlay2.override_kernel_check=true"
    ], 
    "registry-mirrors": ["https://u2nhke40.mirror.aliyuncs.com"]
    }
    EOF
    
  • 启动容器

    sudo systemctl daemon-reload 
    #启动容器
    sudo systemctl restart docker
    

socat 安装

一个多功能的网络工具,名字来源于SOcket CAT,是netcat的增强版,也就是netcat++(扩展了设计,并有新的实现)
```
yum install socat -y
```

conntrack 安装

```
yum install conntrack -y
```

安装KubeKey

  1. 下载安装文件
    wget -c https://kubesphere.io/download/kubekey-v1.0.0-linux-amd64.tar.gz -O - | tar -xz
    
  2. 设置安装文件权限
    chmod +x kk
    

安装最小kubesphere

  1. 执行命令
    ./kk create cluster --with-kubernetes v1.17.9 --with-kubesphere v3.0.0
    
  2. 等待很久看结果
    INFO[23:51:12 CST] Downloading kubecni ...                      
    INFO[23:51:56 CST] Downloading helm ...                         
    INFO[23:52:33 CST] Configurating operating system ...           
    [kubesphere 192.168.31.151] MSG:
    net.ipv4.ip_forward = 1
    net.bridge.bridge-nf-call-arptables = 1
    net.bridge.bridge-nf-call-ip6tables = 1
    net.bridge.bridge-nf-call-iptables = 1
    net.ipv4.ip_local_reserved_ports = 30000-32767
    INFO[23:52:35 CST] Installing docker ...                        
    INFO[23:53:22 CST] Start to download images on all nodes        
    Downloading image: kubesphere/etcd:v3.3.12
    
    

相关文章

网友评论

      本文标题:使用KubeKey安装kubesphere 3.0.0

      本文链接:https://www.haomeiwen.com/subject/nifnyktx.html