k3s+kubesphere安装

由于k3s默认使用containerd来管理容器,而大家比较熟悉docker,因此修改为docker

安装docker

设置阿里云源

yum-config-manager \
    --add-repo \
    https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

安装docker

yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

查看是否启动成功


image.png

安装k3s

curl -sfL https://rancher-mirror.rancher.cn/k3s/k3s-install.sh | \
  INSTALL_K3S_MIRROR=cn \
  INSTALL_K3S_VERSION=v1.25.11+k3s1 \
  INSTALL_K3S_EXEC="--docker" \
  sh -s - 

安装成功会有提示(因终端断开,暂时无法提供具体截图),以上命令测试过很多次都是ok的,如果失败,请看日志在处理。
此处要指定版本号,否则后续安装kubesphere会失败。

安装kubesphere

本机采用最小化安装,参考地址见文末

kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.4.0/kubesphere-installer.yaml
kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.4.0/cluster-configuration.yaml

查看安装日志

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

安装成功


image.png
image.png

参考:
k3s:https://docs.rancher.cn/docs/k3s/installation/install-options/_index/#%E4%BD%BF%E7%94%A8%E8%84%9A%E6%9C%AC%E5%AE%89%E8%A3%85%E7%9A%84%E9%80%89%E9%A1%B9
kubesphere:https://kubesphere.io/zh/docs/v3.4/quick-start/minimal-kubesphere-on-k8s/

https://www.cnblogs.com/elvi/p/17595323.html

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容