使用KubeKey安装kubesphere 3.0.0

kubesphere3独立安装

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

准备电脑

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

    ServiceProtocolActionStart PortEnd PortNotes
    sshTCPallow22
    etcdTCPallow23792380
    apiserverTCPallow6443
    calicoTCPallow90999100
    bgpTCPallow179
    nodeportTCPallow3000032767
    masterTCPallow1025010258
    dnsTCPallow53
    dnsUDPallow53
    local-registryTCPallow5000For offline environment
    local-aptTCPallow5080For offline environment
    rpcbindTCPallow111Required if NFS is used
    ipipIPENCAP / IPIPallowCalico needs to allow the ipip protocol

  • 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 < /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)