离线部署kubesphere

本文详细介绍KubeSphere 3.0.0版本的离线安装过程,包括下载安装包、配置文件修改、内部镜像仓库搭建及集群创建等关键步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1 下载kubesphere3.0.0离线安装包

curl -Ok https://kubesphere-installer.pek3b.qingstor.com/offline/v3.0.0/kubesphere-all-v3.0.0-offline-linux-amd64.tar.gz

解压kubesphere-all-v3.0.0-offline-linux-amd64.tar.gz后进入执行kk命令

tar -zxvf kubesphere-all-v3.0.0-offline-linux-amd64.tar.gz
cd kubesphere-all-v3.0.0-offline-linux-amd64
./kk create config --with-kubesphere v3.0.0 --with-kubernetes v1.18.6

修改config-sample.yaml配置文件

执行内部镜像仓库源

./kk init os -f config-sample.yaml -s ./dependencies/ --add-images-repo

提示信息如下:

INFO[17:41:00 CST] Init operating system                        
INFO[17:41:00 CST] Start initializing kubesphere-master03 [192.168.3.103]  node=192.168.3.103
INFO[17:41:00 CST] Start initializing kubesphere-master01 [192.168.3.101]  node=192.168.3.101
INFO[17:41:00 CST] Start initializing kubesphere-master02 [192.168.3.102]  node=192.168.3.102
Push /root/kubesphere-all-v3.0.0-offline-linux-amd64/dependencies/centos-7-amd64-rpms.tar.gz to 192.168.3.101:/tmp   Done
Push /root/kubesphere-all-v3.0.0-offline-linux-amd64/dependencies/centos-7-amd64-rpms.tar.gz to 192.168.3.103:/tmp   Done
Push /root/kubesphere-all-v3.0.0-offline-linux-amd64/dependencies/centos-7-amd64-rpms.tar.gz to 192.168.3.102:/tmp   Done
INFO[17:41:35 CST] Complete initialization kubesphere-master01 [192.168.3.101]  node=192.168.3.101
INFO[17:41:50 CST] Complete initialization kubesphere-master03 [192.168.3.103]  node=192.168.3.103
INFO[17:41:50 CST] Complete initialization kubesphere-master02 [192.168.3.102]  node=192.168.3.102

Local images repository created successfully. Address: dockerhub.kubekey.local

INFO[17:42:04 CST] Init operating system successful.  

docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED              STATUS              PORTS                            NAMES
31b9c6d1b7da        registry:2          "/entrypoint.sh /etc…"   About a minute ago   Up About a minute   0.0.0.0:443->443/tcp, 5000/tcp   kubekey-registry

推送镜像到私有仓库:

 cd kubesphere-images-v3.0.0/
./push-images.sh  dockerhub.kubekey.local
 

开始部署

./kk create cluster -f config-sample.yaml

kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath=‘{.items[0].metadata.name}’) -f

全部步骤:

 1  ip add
    2  poweroff
    3  ip add
    4  ip add
    5  cd /etc/sysconfig/network-scripts/
    6  ls -ls
    7  mv ifcfg-ens3 ifcfg-eth0
    8  vi ifcfg-eth0
    9  vi /etc/default/grub 
   10  grub2-mkconfig -o /boot/grub2/grub.cfg
   11  reboot
   12  ip add
   13  poweroff
   14  hostnamectl set-hostname kubesphere-master01
   15  exit
   16  vi /etc/sysconfig/network-scripts/ifcfg-eth0
   17  systemctl restart network
   18  vi /etc/hosts
   19  ping kubesphere-master01
   20  ping kubesphere-master02
   21  ping kubesphere-master03
   22  systemctl status firewalld
   23  systemctl stop firewalld
   24  systemctl disable firewalld
   25  setenforce 0
   26  vi /etc/selinux/config
   27  yum install -y socat conntrack ebtables ipset
   28  systemctl status chronyd
   29  vi /etc/chrony.conf
   30  systemctl restart chronyc
   31  systemctl restart chronyd
   32  chronyc sources
   33  cat /etc/hosts
   34  poweroff
   35  date
   36  chronyc sources
   37  date
   38  vi /etc/chrony.conf
   39  systemctl restart chronyd
   40  chronyc sources
   41  poweroff
   42  ls
   43  ls -lsh
   44  cd kubesphere-all-v3.0.0-offline-linux-amd64
   45  ls
   46  du .
   47  du -h .
   48  cd ..
   49  ls
   50  du -h kubesphere-all-v3.0.0-offline-linux-amd64
   51  du -h .
   52  ls
   53  ls -ls
   54  du -h kubesphere-all-v3.0.0-offline-linux-amd64/*
   55  du -sh kubesphere-all-v3.0.0-offline-linux-amd64
   56  pwd
   57  ls
   58  cd kubesphere-all-v3.0.0-offline-linux-amd64
   59  ls
   60  ./kk create config --with-kubesphere v3.0.0 --with-kubernetes v1.18.6
   61  ls
   62  vi config-sample.yaml
   63  ls
   64  ./kk init os -f config-sample.yaml -s ./dependencies/ --add-images-repo
   65  docker ps
   66  ls
   67  cd kubesphere-images-v3.0.0/
   68  ls
   69  ./push-images.sh  dockerhub.kubekey.local
   70  ls
   71  cd ..
   72  ls
   73  ./kk create cluster -f config-sample.yaml
   74  poweroff
   75  cat /etc/hosts
   76  chronyc sources
   77  ls
   78  rm -rf kubesphere-all-v3.0.0-offline-linux-amd64.tar.gz 
   79  ls
   80  curl -Ok https://kubesphere-installer.pek3b.qingstor.com/offline/v3.0.0/kubesphere-all-v3.0.0-offline-linux-amd64.tar.gz
   81  ls
   82  rm -rf kubesphere-all-v3.0.0-offline-linux-amd64.tar.gz 
   83  ls
   84  tar -vfzx kubesphere-all-v3.0.0-offline-linux-amd64.tar.gz
   85  tar -zxvf kubesphere-all-v3.0.0-offline-linux-amd64.tar.gz
   86  docker pull busybox
   87  docker tag busybox:latest dockerhub.kubekey.local/busybox:latest
   88  docker push dockerhub.kubekey.local/busybox:latest
   89  docker images | grep docker
   90  docker images | grep busy
   91  df -h
   92  docker images | grep busy
   93  docker rmi busybox
   94  docker rmi busybox:1.31.1
   95  docker rmi dockerhub.kubekey.local/busybox
   96  docker images | grep busy
   97  docker images | grep box
   98  docker images | grep busy
   99  ls
  100  cd kubesphere-all-v3.0.0-offline-linux-amd64
  101  ls
  102  ./kk create cluster -f config-sample.yaml
  103  kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f
  104  ls
  105  vi config-sample.yaml
  106  free -g
  107  echo "1" > /proc/sys/vm/drop_caches 
  108  free -g
  109  kubectl get pod --all-namespaces
  110  history 
  111  free -g
  112  history 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值