tencent cloud

Cloud File Storage

Releases Notes and Announcements
Release Notes
Announcements
Product Introduction
Overview
Strengths
Storage Classes and Performance
Use Cases
Recommended Regions
Use Limits
Service Regions and Service Providers
Purchase Guide
Billing Overview
Pricing Overview
General Series Billing
Turbo Series Billing
High-Throughput CFS Billing
Billing Mode
IA ‍Storage Billing
Storage Resource Units
Resource Purchase
Viewing Bills
Arrears Reminder
Getting Started
Creating File Systems and Mount Targets
Using CFS File Systems on Linux Clients
Using CFS File Systems on Windows Clients
Using CFS Turbo on Linux Clients
Using the CFS Client Assistant to Mount File Systems
Operation Guide
Access Management
Managing File Systems
Permission Management
Using Tags
Snapshot Management
Guide for Cross-AZ and Cross-Network Access
Automatically Mounting File Systems
Data Migration Service
User Permission Management
User Quotas
Data Encryption
Data Lifecycle Management
Upgrading Standard File Systems
Practical Tutorial
Selecting Kernels for NFS Clients
Managing Turbo CFS Directories
Terminating Compute Instances
Using CFS on TKE
Using CFS on SCF
Using CFS Turbo on TKE
Using CFS Turbo on TKE Serverless Cluster
Selecting a Network for Turbo CFS
Copying Data
CFS Storage Performance Testing
API Documentation
History
Introduction
API Category
Snapshot APIs
File system APIs
Lifecycle APIs
Other APIs
Data Flow APIs
Making API Requests
Permission Group APIs
Service APIs
Scaling APIs
Data Migration APIs
Data Types
Error Codes
Troubleshooting
Client Use Bottleneck due to Large Number of Small Files or Parallel Requests
FAQs
CFS Service Level Agreement
Contact Us
Glossary
ドキュメントCloud File StoragePractical TutorialUsing CFS Turbo on TKE Serverless Cluster

Using CFS Turbo on TKE Serverless Cluster

PDF
フォーカスモード
フォントサイズ
最終更新日: 2024-01-22 22:15:47

Overview

You can mount a Cloud File Storage (CFS) Turbo storage for TKE Serverless Cluster. The add-on is used to mount the Tencent Cloud CFS Turbo file system to a workload based on a private protocol. Currently, only static configuration is supported. For more information about CFS storage classes, see Storage Classes and Performance.

Prerequisites

‍A TKE Serverless Cluster of v1.14 or later has been created.

Directions

Creating a file system

Create a CFS Turbo file system as instructed in Creating a File System and Mount Target.
Note:
After the file system is created, you need to associate the cluster network (vpc-xx) with the CCN instance of the file system. You can check the associated instance in the file system mount target information.

Deploying a Node Plugin

Step 1. Create a csidriver.yaml file

Here is an example of a csidriver.yaml file:
apiVersion: storage.k8s.io/v1beta1
kind: CSIDriver
metadata:
name: com.tencent.cloud.csi.cfsturbo
spec:
attachRequired: false
podInfoOnMount: false

Step 2. Create a CSI driver

Run the following command to create a CSI driver:
kubectl apply -f csidriver.yaml

Creating a CFS Turbo volume

Step 1. Create a CFS Turbo type PV based on the following template

apiVersion: v1
kind: PersistentVolume
metadata:
name: pv-cfsturbo
spec:
accessModes:
- ReadWriteMany
capacity:
storage: 10Gi
csi:
driver: com.tencent.cloud.csi.cfsturbo
volumeHandle: pv-cfsturbo
volumeAttributes:
host: 10.0.0.1
# Set host to the actual mount target IP
fsid: d3816815
# Set fsid to the actual FSID
path: /
# CFS Turbo subdirectory
storageClassName: ""
Parameters:
metadata.name: The name of the created PV.
spec.csi.volumeHandle: It must be consistent with the PV name.
spec.csi.volumeAttributes.host: The IP address of the file system. You can check it in the file system mount target information.
spec.csi.volumeAttributes.fsid: The FSID of the file system (not the file system ID). You can check it in the file system mount target information. It is the string after "tcp0:/" and before "/cfs" in the mount command.
spec.csi.volumeAttributes.path: File system subdirectory, which defaults to "/" if not specified. (To improve mounting performance, the plugin backend actually locates the "/cfs" directory for "/"). If you want to mount a subdirectory, ensure that the subdirectory exists in the file system "/cfs". After a subdirectory is mounted, the workload will not be able to access its upper-level directories. For example, if you want to set "path: /test", ensure that "/cfs/test" exists in the file system.


Step 2. Create a PVC based on the following template to bind the PV

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-cfsturbo
spec:
storageClassName: ""
volumeName: pv-cfsturbo
accessModes:
- ReadWriteMany
resources:
requests:
storage: 10Gi
Parameters:
metadata.name: The name of the created PVC.
spec.volumeName: It must be consistent with the name of the PV created in Step 1.

Using a CFS Turbo volume

Create a Pod ‍and mount the PVC based on the following template.
apiVersion: v1
kind: Pod
metadata:
name: nginx
spec:
containers:
- image: ccr.ccs.tencentyun.com/qcloud/nginx:1.9
imagePullPolicy: Always
name: nginx
ports:
- containerPort: 80
protocol: TCP
volumeMounts:
- mountPath: /var/www
name: data
volumes:
- name: data
persistentVolumeClaim:
claimName: pvc-cfsturbo


ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック