安装KubeSphere最好的方法就是参考官方文档,而且官方文档是中文的。

官网地址:https://kubesphere.com.cn/

https://github.com/kubesphere/kubesphere/blob/master/README_zh.md

Kubernetes(K8S) kubesphere 介绍

安装提前条件:

使用 Kubeadm 部署 Kubernetes(K8S) 安装--附K8S架构图

使用 Kubeadm 部署 Kubernetes(K8S) 安装 -- 持久化存储(NFS网络存储)

Kubernetes(K8S) 安装 Metrics-Server

# 检查 K8S 版本,低版本需要升级
[root@k8smaster kubesphere]# kubectl version

安装

[root@k8smaster ~]# cd /opt/k8s/kubesphere
# 创建文件storageclass.yaml
[root@k8smaster kubesphere]# vi storageclass.yaml
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: local-storage
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer # persistentVolumeClaim.yaml
[root@k8smaster kubesphere]# vi persistentVolumeClaim.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: local-pve
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
storageClassName: local-storage # 下载核心文件(可以讯雷下载好传到 服务器)
[root@k8smaster kubesphere]# wget https://github.com/kubesphere/ks-installer/releases/download/v3.1.1/kubesphere-installer.yaml
[root@k8smaster kubesphere]# wget https://github.com/kubesphere/ks-installer/releases/download/v3.1.1/cluster-configuration.yaml
[root@k8smaster kubesphere]# ll
总用量 12
-rwxrwxrwx 1 root root 7663 4月 23 09:41 cluster-configuration.yaml
-rwxrwxrwx 1 root root 4064 4月 23 09:41 kubesphere-installer.yaml # 安装
[root@k8smaster kubesphere]# kubectl apply -f storageclass.yaml
storageclass.storage.k8s.io/local-storage created
[root@k8smaster kubesphere]# kubectl apply -f persistentVolumeClaim.yaml
persistentvolumeclaim/local-pve created [root@k8smaster kubesphere]# kubectl apply -f kubesphere-installer.yaml
customresourcedefinition.apiextensions.k8s.io/clusterconfigurations.installer.kubesphere.io created
namespace/kubesphere-system created
serviceaccount/ks-installer created
clusterrole.rbac.authorization.k8s.io/ks-installer created
clusterrolebinding.rbac.authorization.k8s.io/ks-installer created
deployment.apps/ks-installer created [root@k8smaster kubesphere]# kubectl apply -f cluster-configuration.yaml
clusterconfiguration.installer.kubesphere.io/ks-installer created #解决找不到证书的问题
[root@k8smaster kubesphere]# kubectl -n kubesphere-system create secret generic kube-etcd-client-certs --from-file=etcd-client-ca.crt=/etc/kubernetes/pki/etcd/ca.crt --from-file=etcd-client.crt=/etc/kubernetes/pki/apiserver-etcd-client.crt --from-file=etcd-client.key=/etc/kubernetes/pki/apiserver-etcd-client.key
secret/kube-etcd-client-certs created # 查看 POD 详情
[root@k8smaster kubesphere]# kubectl describe pod -n kubesphere-system
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 12m default-scheduler Successfully assigned kubesphere-system/ks-installer-7bd6b699df-9lnlc to k8snode1
Normal Pulling 12m kubelet Pulling image "kubesphere/ks-installer:v3.1.1"
Normal Pulled 11m kubelet Successfully pulled image "kubesphere/ks-installer:v3.1.1"
Normal Created 11m kubelet Created container installer
Normal Started 11m kubelet Started container installer
[root@k8smaster kubesphere]# # 使用命令查看进度
[root@k8smaster kubesphere]# kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f

如果出现下面错误,需要安装 storageclass、persistentVolumeClaim

TASK [preinstall : KubeSphere | Stopping if default StorageClass was not found] ***
fatal: [localhost]: FAILED! => {
"assertion": "\"(default)\" in default_storage_class_check.stdout",
"changed": false,
"evaluated_to": false,
"msg": "Default StorageClass was not found !"
}
# 删除
[root@k8smaster kubesphere]# kubectl delete -f kubesphere-installer.yaml
[root@k8smaster kubesphere]# kubectl delete -f cluster-configuration.yaml
# 安装完 storageclass 后,重新安装
[root@k8smaster kubesphere]# kubectl apply -f storageclass.yaml
[root@k8smaster kubesphere]# kubectl apply -f persistentVolumeClaim.yaml
[root@k8smaster kubesphere]# kubectl apply -f kubesphere-installer.yaml
[root@k8smaster kubesphere]# kubectl apply -f cluster-configuration.yaml

Kubernetes(K8S) kubesphere 安装的更多相关文章

  1. Kubernetes(k8s)完整安装教程

    Kubernetes(k8s)完整安装教程  2019-08-27 2.3k 记录 发表评论 目录 1 安装 1.1 安装 Docker 1.2 安装 VirtualBox 1.3 安装 kubect ...

  2. ubuntu16.04 docker kubernetes(k8s) istio 安装

    版本: docker: 19.03.5 kubernetes: 1.17.0 istio: 1.4.3 步骤一:给ubuntu换源 https://www.cnblogs.com/lfri/p/106 ...

  3. kubernetes(k8s) helm安装kafka、zookeeper

    通过helm在k8s上部署kafka.zookeeper 通过helm方法安装 k8s上安装kafka,可以使用helm,将kafka作为一个应用安装.当然这首先要你的k8s支持使用helm安装.he ...

  4. K8S kubesphere安装mysql

    原先我们使用Docker按照mysql时候的命令 docker run -p 3306:3306 --name mysql-01 \ -v /mydata/mysql/log:/var/log/mys ...

  5. 从零搭建云原生技术kubernetes(K8S)环境-通过kubesPhere的AllInOne方式

    前言 k8s云原生搭建,步骤有点多,但通过kubesphere,可以快速搭建k8s环境,同时有一个以 Kubernetes 为内核的云原生分布式操作系统-kubesphere,本文将从零开始进行kub ...

  6. Windows玩转Kubernetes系列3-Centos安装K8S

    以往文章参考: Windows玩转Kubernetes系列1-VirtualBox安装Centos Windows玩转Kubernetes系列2-Centos安装Docker 安装K8S yum in ...

  7. Centos7 安装部署Kubernetes(k8s)集群

    目录 一.系统环境 二.前言 三.Kubernetes 3.1 概述 3.2 Kubernetes 组件 3.2.1 控制平面组件 3.2.2 Node组件 四.安装部署Kubernetes集群 4. ...

  8. Istio(二):在Kubernetes(k8s)集群上安装部署istio1.14

    目录 一.模块概览 二.系统环境 三.安装istio 3.1 使用 Istioctl 安装 3.2 使用 Istio Operator 安装 3.3 生产部署情况如何? 3.4 平台安装指南 四.Ge ...

  9. 使用k8s operator安装和维护etcd集群

    关于Kubernetes Operator这个新生事物,可以参考下文来了解这一技术的来龙去脉: https://yq.aliyun.com/articles/685522?utm_content=g_ ...

  10. 深入剖析Kubernetes k8s

    深入剖析Kubernetes k8s 毫无疑问,Kubernetes 已经成为容器领域当之无愧的事实标准.除了 Google.Microsoft 等技术巨擘们在容器领域里多年的博弈外,国内的 BAT. ...

随机推荐

  1. 实验1.SDN拓扑实践

    实验1:SDN拓扑实践 一.基本要求 (一)Mininet运行结果截图 (二) 使用Mininet的命令行生成如下拓扑: 1. 3台交换机,每个交换机连接1台主机,3台交换机连接成一条线. 2. 3台 ...

  2. Ubuntu 20.24 安装Postgresql 14

      1.运行环境 WSL+Ubuntu 20.04   2.安装Postgresql 进入Linux命令行,参照Postgresql官网安装指南 # Create the file repositor ...

  3. 关于tomcat部署web服务方式

    方式1.apache-tomcat-8.0.47\webapps文件夹下放war包会自动解压.文件夹名称就是访问路径 方式2.apache-tomcat-8.0.47\conf\Catalina\lo ...

  4. selenium 使用ddt,运行提示错误信息no such test method

    测试用例test_asg测试数据是通过ddt的方式添加,使用suite.addTest方法添加该用例提示错误信息no such test method in <class 'unitest_lo ...

  5. springboot-项目获取resources下文件

    背景: 项目的resources 目录下放置了一份txt文件,需求是想获取到这份文件转成File对象,调用文件上传的接口进行文件上传操作. 实现: 1.使用 ResourceUtils:本地ok,测试 ...

  6. 比 poi导入导出更好用的 EasyExcel使用小结

    转载请注明出处: 官方文档: https://easyexcel.opensource.alibaba.com/docs/current/quickstart/read 1.简洁 Java解析.生成E ...

  7. 学会规则引擎Drools,让你早点下班

    前言 现在有这么个需求,网上购物,需要根据不同的规则计算商品折扣,比如VIP客户增加5%的折扣,购买金额超过1000元的增加10%的折扣等,而且这些规则可能随时发生变化,甚至增加新的规则.面对这个需求 ...

  8. 针对于Sql server突然连接不到服务器的解决方法

    问题叙述 点击连接之后,总是会弹出一个错误弹窗: 方法解决 快捷键Win+R,输入services.msc,进入到服务界面: 找到SQL 代理(DEV) 将手动打开改成自动 再连接试一次 连上啦! ( ...

  9. Android笔记--图形控制

    图形Drawable 形状图形(其定义文件是以shape标签为根节点的XML描述文件,支持四种类型的形状) 具体实现: 在shape标签里面,solid指定填充的颜色,stroke指定边框颜色,cor ...

  10. Python查找存储区0KB文件并记录下地址

    查找存储区域中0KB大小文件,可以根据需要变更指定大小. #-*- coding: utf-8 -*- #!/usr/bin/python from os.path import isdir,absp ...