tencent cloud

容器服务

动态与公告
产品动态
公告
产品发布记录
产品简介
产品概述
产品优势
产品架构
应用场景
产品功能
基本概念
原生 Kubernetes 名词对照
容器服务高危操作
地域和可用区
开源组件
购买指南
购买指引
购买 TKE 标准集群
购买原生节点
购买超级节点
快速入门
新手指引
快速创建一个标准集群
入门示例
容器应用部署 Check List
集群配置
标准集群概述
集群管理
网络管理
存储管理
节点管理
GPU 资源管理
远程终端
应用配置
工作负载管理
服务和配置管理
组件和应用管理
弹性伸缩
容器登录方式
可观测配置
运维可观测性
成本洞察和优化
调度配置
调度组件概述
资源利用率优化调度
业务优先级保障调度
Qos 感知调度
安全和稳定性
容器服务安全组设置
身份验证和授权
应用安全
多集群管理
计划升级
备份中心
云原生服务指南
云原生 etcd
Prometheus 监控服务
TKE Serverless 集群指南
TKE 注册集群指南
实践教程
集群
Serverless 集群
调度
安全
服务部署
网络
发布
日志
监控
运维
Terraform
DevOps
弹性伸缩
容器化
微服务
成本管理
混合云
AI
故障处理
节点磁盘爆满排障处理
节点高负载排障处理
节点内存碎片化排障处理
集群 DNS 解析异常排障处理
集群 Kube-Proxy 异常排障处理
集群 API Server 网络无法访问排障处理
Service&Ingress 网络无法访问排障处理
Service&Ingress 常见报错和处理
Nginx Ingress 偶现 Connection Refused
CLB Ingress 创建报错排障处理
Pod 网络无法访问排查处理
Pod 状态异常与处理措施
授权腾讯云售后运维排障
CLB 回环问题
API 文档
History
Introduction
API Category
Making API Requests
Elastic Cluster APIs
Resource Reserved Coupon APIs
Cluster APIs
Third-party Node APIs
Relevant APIs for Addon
Network APIs
Node APIs
Node Pool APIs
TKE Edge Cluster APIs
Cloud Native Monitoring APIs
Scaling group APIs
Super Node APIs
Other APIs
Data Types
Error Codes
TKE API 2022-05-01
常见问题
TKE 标准集群
TKE Serverless 集群
运维类
隐患处理
服务类
镜像仓库类
远程终端类
事件类
资源管理类
服务协议
TKE Service Level Agreement
TKE Serverless Service Level Agreement
联系我们
词汇表

CBS-CSI 简介

PDF
聚焦模式
字号
最后更新时间: 2024-02-05 10:22:21

操作场景

CBS-CSI组件 支持 TKE 集群通过控制台快捷选择存储类型,并创建对应块存储云硬盘类型的 PV 和 PVC。本文提供 CBS-CSI 组件功能特性等说明并介绍几种常见示例用法。

功能特性

功能
说明
静态数据卷
支持手动创建 Volume、PV 对象及 PVC 对象
动态数据卷
支持通过 StorageClass 配置、创建和删除 Volume 及 PV 对象
存储拓扑感知
云硬盘不支持跨可用区挂载,在多可用区集群中,CBS-CSI 组件将先调度 Pod,后调度 Node 的 zone 创建 Volume
调度器感知节点 maxAttachLimit
腾讯云单个云服务器上默认最多挂载20块云硬盘,调度器调度 Pod 时将过滤超过最大可挂载云硬盘数量的节点
卷在线扩容
支持通过修改 PVC 容量字段,实现在线扩容(仅支持云硬盘类型)
卷快照和恢复
支持通过快照创建数据卷

组件说明

CBS-CSI 组件在集群内部署后,包含以下组件:
DaemonSet:每个 Node 提供一个 DaemonSet,简称为 NodePlugin。由 CBS-CSI Driver 和 node-driver-registrar 两个容器组成,负责向节点注册 Driver,并提供挂载能力。
StatefulSet 和 Deployment:简称为 Controller。由 Driver 和多个 Sidecar(external-provisioner、external-attacher、external-resizer、external-snapshotter、snapshot-controller)一起构成,提供创删卷、attach、detach、扩容、快照等能力。




限制条件

TKE 集群版本 ≥ 1.14
使用 CBS-CSI 组件后,才可在 TKE 集群中为云硬盘在线扩容和创建快照。
已经使用 QcloudCbs(In-Tree 插件)的 TKE 集群,可以继续正常使用。(后续将通过 Volume Migration 统一到 CBS CSI)

CBS-CSI 权限

说明:
权限场景章节中仅列举了组件核心功能涉及到的相关权限,完整权限列表请参考权限定义章节。

权限说明

该组件权限是当前功能实现的最小权限依赖。
需要挂载主机 /var/lib/kubelet 相关目录到容器来完成 volume 的 mount/umount,所以需要开启特权级容器。

权限场景

功能
涉及对象
涉及操作权限
获取 node 资源中 providerID 来感知节点最大可挂盘数量
node
get/list
根据 pvc/pv 等信息完成盘的创建和删除
pv/pvc/storageclasses/csinode
get/list/watch/create/update/patch/delete
根据 volumeattachments 资源对象来完成盘的挂载和卸载
volumeattachments/volumesnapshotclasses
create/get/list/watch/update/delete
对盘进行扩容快照
pod/volumesnapshotclasses/volumesnapshots/configmap
get/list/watch

权限定义

kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cbs-csi-controller-role
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "update", "patch", "create", "delete"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: [""]
resources: ["persistentvolumeclaims/status"]
verbs: ["update", "patch"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["get", "list", "watch", "create", "update", "patch"]
- apiGroups: ["storage.k8s.io"]
resources: ["csinodes"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", "watch"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
- apiGroups: ["csi.storage.k8s.io"]
resources: ["csinodeinfos"]
verbs: ["get", "list", "watch"]
- apiGroups: ["storage.k8s.io"]
resources: ["volumeattachments", "volumeattachments/status"]
verbs: ["get", "list", "watch", "update", "patch"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotcontents"]
verbs: ["create", "get", "list", "watch", "update", "delete"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshots"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
verbs: ["create", "list", "watch", "delete"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshotcontents/status"]
verbs: ["update"]
- apiGroups: ["snapshot.storage.k8s.io"]
resources: ["volumesnapshots/status"]
verbs: ["update"]
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["get", "list", "watch", "update", "patch", "create", "delete"]
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cbs-csi-node-role
namespace: kube-system
rules:
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list"]

使用示例

帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈