内容目录
前置准备
在可以链接外网机器
wget https://github.com/labring/sealos/releases/download/v4.1.4/sealos_4.1.4_linux_amd64.tar.gz &&
tar -zxvf sealos_4.1.4_linux_amd64.tar.gz sealos && chmod +x sealos && mv sealos /usr/bin
sealos pull labring/kubernetes:v1.25.0
sealos save -o kubernetes.tar labring/kubernetes:v1.25.0
sealos pull labring/helm:v3.8.2
sealos save -o helm.tar labring/helm:v3.8.2
sealos pull labring/calico:v3.24.5
sealos save -o calico.tar labring/calico:v3.24.5
打包
sealos_4.1.4_linux_amd64.tar.gz
helm.tar
kubernetes.tar
calico.tar
离线节点部署
在目标内网节点
tar -zxvf sealos_4.1.4_linux_amd64.tar.gz sealos && chmod +x sealos && mv sealos /usr/bin
载入镜像
sealos load -i helm.tar
sealos load -i kubernetes.tar
sealos load -i calico.tar
启动集群(单节点)
sealos run labring/kubernetes:v1.25.0 labring/helm:v3.8.2 labring/calico:v3.24.5 --single
[root@platform-sit-innertest-cks-dtzeq467-6l77y2 ~]# kubectl get pods -A
NAMESPACE NAME READY STATUS RESTARTS AGE
calico-apiserver calico-apiserver-f986b5f9b-gflgp 1/1 Running 0 3h18m
calico-apiserver calico-apiserver-f986b5f9b-s8stc 1/1 Running 0 3h18m
calico-system calico-kube-controllers-6b57db7fd6-7qpbr 1/1 Running 0 3h18m
calico-system calico-node-7qv7q 1/1 Running 0 3h18m
calico-system calico-typha-6c686b99fb-622gr 1/1 Running 0 3h18m
calico-system csi-node-driver-nmxf2 2/2 Running 0 3h18m
kube-system coredns-565d847f94-mc5x6 1/1 Running 0 3h19m
kube-system coredns-565d847f94-xxq4r 1/1 Running 0 3h19m
kube-system etcd-platform-sit-innertest-cks-dtzeq467-6l77y2 1/1 Running 2 3h19m
kube-system kube-apiserver-platform-sit-innertest-cks-dtzeq467-6l77y2 1/1 Running 2 3h19m
kube-system kube-controller-manager-platform-sit-innertest-cks-dtzeq467-6l77y2 1/1 Running 2 3h19m
kube-system kube-proxy-zkbmh 1/1 Running 0 3h19m
kube-system kube-scheduler-platform-sit-innertest-cks-dtzeq467-6l77y2 1/1 Running 2 3h19m
tigera-operator tigera-operator-85544ddb66-b7plr 1/1 Running 0 3h19m
启动集群(多节点)
sealos run labring/kubernetes:v1.25.0 labring/helm:v3.8.2 labring/calico:v3.24.5
--masters 192.168.64.2,192.168.64.22,192.168.64.20
--nodes 192.168.64.21,192.168.64.19 -p [your-ssh-passwd]
其中-p为机器密码,也可以设置秘钥免密登录
[root@sealos1 .sealos]# tree -L 3 . ├── default #默认集群名 │ ├── Clusterfile #集群配置 │ ├── etc │ │ ├── admin.conf │ │ ├── controller-manager.conf │ │ ├── kubeadm-init.yaml #kubeadm配置 │ │ ├── kubeadm-token.json │ │ ├── kubelet.conf │ │ ├── registry_htpasswd │ │ └── scheduler.conf │ ├── pki #证书 │ │ ├── apiserver.crt │ │ ├── apiserver-etcd-client.crt │ │ ├── apiserver-etcd-client.key │ │ ├── apiserver.key │ │ ├── apiserver-kubelet-client.crt │ │ ├── apiserver-kubelet-client.key │ │ ├── ca.crt │ │ ├── ca.key │ │ ├── etcd │ │ ├── front-proxy-ca.crt │ │ ├── front-proxy-ca.key │ │ ├── front-proxy-client.crt │ │ ├── front-proxy-client.key │ │ ├── sa.key │ │ └── sa.pub │ └── tmp │ └── kubeadm-init.yaml └── logs └── sealos.log #安装日志