linux cpu占用率如何看
277
2022-11-03
[云原生专题-61]:Kubesphere云治理-安装(3)-可插拔组件的安装
作者主页(文火冰糖的硅基工坊):文火冰糖(王文兵)的博客_文火冰糖的硅基工坊
目录
第1章 概述
1.1 Kubesphere在系统中的位置
1.2 可插拔组件的安装概述
1.3 官网安装步骤:
第2章 Kubesphere支持的可插拔组件
2.1 组件类型
2.2 可插拔功能组件配置要求
第3章 配置文件解读
3.1 集群安装配置文件解读:cluster-configuration.yaml
3.2 单机版配置文件:conf/common.yaml
第4章 安装步骤
4.1 前置条件
4.2 在安装Kubesphere前启用可插拔组件 -- Linux KK上安装
4.3 在安装Kubesphere前启用可插拔组件 -- K8S上安装
4.4 在安装Kubesphere后启用可插拔组件
4.5 查看组件的安装状态
第1章 概述
1.1 Kubesphere在系统中的位置
1.2 可插拔组件的安装概述
Kubesphere提供了大量的功能,而这些功能遵循了微服务的理念,每个功能可以动态的安装和卸载,而每个功能相当于K8S一个独立的服务Service。
KubeSphere 在 2.1 版本的 Installer 对各功能组件进行了 解耦,快速安装将默认仅开启最小化安装(Minimal Installation),支持在安装前或安装后 自定义可插拔的功能组件的安装,使最小化安装 更快速轻量且资源占用更少,也方便不同用户 按需选择安装不同的功能组件。
1.3 官网安装步骤:
第2章 Kubesphere支持的可插拔组件
2.1 组件类型
KubeSphere 有以下六个可插拔功能组件,您可以根据需求,选择开启安装 KubeSphere 的功能组件。我们非常建议您开启这些功能组件来体验 KubeSphere 完整的功能以及端到端的解决方案。
KubeSphere 应用商店 =》有了应用商店,就可以直接通过KubeSphere安装应用,简化部署KubeSphere DevOps 系统 =》集成Jekins等自动化开发流程管理各种工具,实现流水线管理KubeSphere 日志系统 =》内置日志查询、日志收集和日志转发等功能KubeSphere Service Mesh(基于 Istio)=》支持灰度发布、流量拓扑、流量治理、TracingKubeSphere 告警通知系统 =》内存等资源监控、Email通知。Metrics-server(HPA)=》根据业务需求和策略自动调整计算能力(即实例数量)的服务
2.2 可插拔功能组件配置要求
注意:开启可选功能组件之前,请先参考下表确认集群的可用 CPU 与内存空间是否充足(下表是计算得出的各组件 CPU 与内存的 Request 值),否则可能会因为资源不足而导致的机器崩溃或其它问题。
功能组件 | 命名空间(所属项目) | CPU (request) | 内存 (request) | 说明 |
KubeSphere 应用商店 | openpitrix-system | 0.3 core | 300 MiB | 内置应用商店与应用生命周期管理 ,建议安装 |
KubeSphere 告警通知系统 | kubesphere-alerting-system | 0.08 core | 80 M | alerting 与 notification 安装时 建议同时开启 |
KubeSphere DevOps System(All-in-one) | kubesphere-devops-system | 34 m | 2.69 G | 一站式 DevOps 方案, 内置 Jenkins 流水线与 B2I & S2I |
KubeSphere DevOps System (Multi-node) | kubesphere-devops-system | 0.47 core | 8.6 G | 多节点安装 DevOps 需要 有一个节点的内存大于 8 G |
KubeSphere Service Mesh(基于 Istio) | istio-system | 2 core | 3.6 G | 支持灰度发布、流量拓扑、流量治理、Tracing |
KubeSphere 日志系统 | kubesphere-logging-system | 56 m | 2.76 G | 内置日志查询、日志收集和日志转发等功能 |
弹性伸缩(HPA) | metrics-server | 5 m | 44.35 MiB | 内置 弹性伸缩 HPA |
第3章 配置文件解读
3.1 集群安装配置文件解读:cluster-configuration.yaml
为了方便对组件的动态安装和卸载,Kubesphere在K8S service基础之上,进一步抽象,抽象出了一个个的功能 模块(而不是service),可以对这些功能模型进行enable或disable。
这些功能模块的disable/enable的状态以及其他参数的状态,通过cluster-configuration.yaml来承载,我们只需要通过编辑和apply该配置文件,就可以完成功能的动态卸载与安装。
installer.kubesphere.io/v1alpha1kind: ClusterConfigurationmetadata: name: ks-installer namespace: kubesphere-system labels: version: v3.1.0spec: persistence: storageClass: "" # If there is not a default StorageClass in your cluster, you need to specify an existing StorageClass here. authentication: jwtSecret: "" # Keep the jwtSecret consistent with the host cluster. Retrive the jwtSecret by executing "kubectl -n kubesphere-system get cm kubesphere-config -o yaml | grep -v "apiVersion" | grep jwtSecret" on the host cluster. local_registry: "" # Add your private registry address if it is needed. etcd: monitoring: false # Whether to enable etcd monitoring dashboard installation. You have to create a secret for etcd before you enable it. endpointIps: localhost # etcd cluster EndpointIps, it can be a bunch of IPs here. port: 2379 # etcd port tlsEnable: true common: redis: enabled: false openldap: enabled: false minioVolumeSize: 20Gi # Minio PVC size. openldapVolumeSize: 2Gi # openldap PVC size. redisVolumSize: 2Gi # Redis PVC size. monitoring: endpoint: # Prometheus endpoint to get metrics data es: # Storage backend for logging, events and auditing. # elasticsearchMasterReplicas: 1 # total number of master nodes, it's not allowed to use even number # elasticsearchDataReplicas: 1 # total number of data nodes. elasticsearchMasterVolumeSize: 4Gi # Volume size of Elasticsearch master nodes. elasticsearchDataVolumeSize: 20Gi # Volume size of Elasticsearch data nodes. logMaxAge: 7 # Log retention time in built-in Elasticsearch, it is 7 days by default. elkPrefix: logstash # The string making up index names. The index name will be formatted as ks-
enabled: false =》 enabled: true
3.2 单机版配置文件:conf/common.yaml
# LOGGING CONFIGURATION# logging is an optional component when installing KubeSphere, and# Kubernetes builtin logging APIs will be used if logging_enabled is set to false.# Builtin logging only provides limited functions, so recommend to enable logging.logging_enabled: true # 是否安装内置的日志系统elasticsearch_master_replica: 1 # es 主节点副本数,主节点数不能为偶数elasticsearch_data_replica: 2 # 数据节点副本数elasticsearch_volume_size: 20Gi # Elasticsearch 存储卷大小log_max_age: 7 # 集群内置的 Elasticsearch 中日志保留时间,默认是 7 天elk_prefix: logstash # 自定义 index 命名方式,index 将以 ks-
第4章 安装步骤
4.1 前置条件
Linux平台上已经安装了Kubesphere installer.
4.2 在安装Kubesphere前启用可插拔组件 -- Linux KK上安装
可以通过K8S的命令安装这些服务,只需要编制每个服务的yaml配置文件,然后通过kubectl apply -f命令或通过kk命令,就可以安装一个独立的服务。
# 下载指定集群配置文件# 修改配置文件,enable/disable某些组件# 应用配置文件$ ./kk create cluster -f config-sample.yaml#
4.3 在安装Kubesphere前启用可插拔组件 -- K8S上安装
# 下载指定集群配置文件# 修改配置文件,enable/disable某些组件# 应用配置文件$ kubectl apply -f $ kubectl apply -f cluster-configuration.yaml#
无论是在 Linux 上还是在 Kubernetes 上安装 KubeSphere,
安装后都可以在 KubeSphere 的 Web 控制台中检查已启用组件的状态。
4.4 在安装Kubesphere后启用可插拔组件
Kubesphere增强的功能服务,就不需要通过kubectl apply -f命令也安装了,只需要通过Kubesphere的用户界面,简答操作UE界面,就可以完成功能模块的动态安装与卸载,非常的方便。
4.5 查看组件的安装状态
(1)Kubesphere UI检查
可以在UI上检查所有的组件的安装状态。
(2)命令行检查
$ kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l app=ks-install -o jsonpath='{.items[0].metadata.name}') -f$ kubectl get pod --all-namespaces
作者主页(文火冰糖的硅基工坊):文火冰糖(王文兵)的博客_文火冰糖的硅基工坊
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~