kubesphere3獨立安裝
使用獨立linux電腦 安裝 kubesphere 3.0.0體驗產(chǎn)品
準(zhǔn)備電腦
-
禁用防火墻或者配置開啟如下端口
<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
-
安裝容器
- 設(shè)置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
-
設(shè)置鏡像
sudo mkdir -p /etc/docker # 設(shè)置鏡像 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 安裝
一個多功能的網(wǎng)絡(luò)工具咕痛,名字來源于SOcket CAT脖隶,是netcat的增強版,也就是netcat++(擴展了設(shè)計暇检,并有新的實現(xiàn))
```
yum install socat -y
```
conntrack 安裝
```
yum install conntrack -y
```
安裝KubeKey
- 下載安裝文件
wget -c https://kubesphere.io/download/kubekey-v1.0.0-linux-amd64.tar.gz -O - | tar -xz
- 設(shè)置安裝文件權(quán)限
chmod +x kk
安裝最小kubesphere
- 執(zhí)行命令
./kk create cluster --with-kubernetes v1.17.9 --with-kubesphere v3.0.0
- 等待很久看結(jié)果
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