tencent cloud

Tencent Kubernetes Engine

CFS-CSI

Baixar
Modo Foco
Tamanho da Fonte
Última atualização: 2026-11-13 20:22:03
Traduzido por IA

Introduction

Component Description

The Kubernetes-csi-tencentloud CFS plugin implements the CSI interface, helping you use Tencent Cloud CFS in your container cluster.
Attention:
For clusters on version 1.12, modify the kubelet configuration to add --feature-gates=KubeletPluginsWatcher=false.

Kubernetes Objects Deployed in a Cluster

Kubernetes Object Name
Type
Default Resource Usage
Namespaces
csi-provisioner-cfsplugin
StatefulSet
-
kube-system
csi-nodeplugin-cfsplugin
DaemonSet
-
kube-system
csi-provisioner-cfsplugin
Service
1C2G
kube-system

Scenarios

CFS provides scalable shared file storage services and can be used with Tencent Cloud services such as CVM, TKE, and Batch. CFS offers standard NFS and CIFS/SMB file system access protocols, providing a shared data source for multiple CVM instances or other computing services. It supports elastic capacity and performance scaling, and existing applications can mount and use it without modification. CFS is a highly available and reliable distributed file system, suitable for scenarios such as big data analytics, media processing, and content management.
CFS is easy to integrate. You do not need to adjust your business structure or make complex configurations. You can integrate and use CFS in three steps: create a file system, launch a file system client on the server, and mount the created file system. With the CFS-CSI add-on, you can quickly use CFS through the standard native Kubernetes in your TKE cluster. For more information, see CFS Usage.

Limits

For the limits of CFS, see CFS System Limitations.
To use CFS in TKE, you need to install this add-on in your cluster, which will occupy some system resources.

cfs-csi Permissions

Note:
The Permission Scenarios section lists only the permissions related to the core features of the component. For the complete permission list, see the Permission Definitions section.

Permission Description

The permissions of this component are the minimum permission dependencies required for the current feature implementation.
You need to mount the relevant directories under /var/lib/kubelet on the host to the container to complete volume mount/umount operations, so you need to enable privileged containers.

Permission Scenarios

Function
Involved Object
Operation Permission Involved
Support dynamic creation of cfs instances.
persistentvolumeclaims/persistentvolumes
All operations
storageclasses
get/list/watch
Support cfs instances in shared mode.
tcfs
get/list/watch/create/update/delete/patch
deployment
get/list/watch/create/update/delete
node
get/list

Permission Definition

kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: csi-cfs-controller-role
rules:
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list"]
- apiGroups: [""]
resources: ["services", "events", "configmaps", "endpoints"]
verbs: ["get","list","create","update","patch","delete"]
- apiGroups: [""]
resources: ["services/status", "events/status"]
verbs: ["get"]
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "delete", "update"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "update", "patch", "create"]
- apiGroups: ["storage.k8s.io"]
resources: ["volumeattachments", "volumeattachments/status"]
verbs: ["get", "list", "watch", "update", "patch"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: ["extensions"]
resources: ["ingresses"]
verbs: ["get", "list", "watch", "update", "patch", "create"]
- apiGroups: ["extensions"]
resources: ["ingresses/status"]
verbs: ["get"]
- apiGroups: ["apps"]
resources: ["deployments"]
verbs: ["get", "list", "delete", "update", "create", "watch"]
- apiGroups: ["apps"]
resources: ["deployments/status"]
verbs: ["get"]
- apiGroups: ["tcfsoperator.k8s.io"]
resources: ["tcfs", "tcfs/status"]
verbs: ["get", "list", "watch", "create", "delete", "update", "patch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: tcfs-subdir-external-provisioner-runner
rules:
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "create", "delete"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["create", "update", "patch"]

Operation Steps

Installing and Setting the CFS Component

1. Log in to the TKE console and select Clusters in the left sidebar.
2. On the cluster management page, click the ID of the target cluster to go to the cluster details page.
3. In the left sidebar, choose Component Management to go to the component list page.
4. On the component list page, click Create, and then select CFS on the component creation page.
5. Click Complete.

Creating a CFS-type StorageClass

1. On the cluster management page, click the ID of the cluster that uses CFS to go to the cluster details page.
2. In the left sidebar, choose Storage > StorageClass, and click Create to go to the StorageClass creation page.
3. Create a CFS-type StorageClass based on your actual requirements, as shown in the following figure:


4. Click Create StorageClass.

Creating a PersistentVolumeClaim

1. On the cluster management page, click the ID of the cluster that uses CFS to go to the cluster details page.
2. In the left sidebar, choose Storage > PersistentVolumeClaim, and click Create to go to the PersistentVolumeClaim creation page.
3. Create a CFS-type PersistentVolumeClaim based on your actual requirements and select the StorageClass created above.
4. Click Create PersistentVolumeClaim.

Create a workload

1. On the cluster management page, click the ID of the cluster that uses CFS to go to the cluster details page.
2. In the left sidebar, choose Workload > Deployment, and click Create to go to the Workload creation page.
3. Based on your actual requirements, select Use existing PVC for the volume and choose the PVC created above.
4. After mounting to the specified path in the container, click Create Workload.

Ajuda e Suporte

Esta página foi útil?

comentários