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

Using CFS Turbo on TKE

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

Overview

This document describes how to integrate CFS Turbo with a Tencent Kubernetes Engine (TKE) cluster.

Prerequisites

The operating system of the TKE host node is compatible with the Turbo series.
You have installed a Turbo-based client on all TKE nodes. You are advised to use pshell to operate in batches.
For the compatible operating systems and how to install the client, see Using CFS Turbo on Linux Clients.

Directions

Using kubectl to connect to a cluster

Use kubectl to connect to a TKE cluster. For more information, see Connecting to a Cluster.

Creating a Pod for mounting Turbo using YAML files

2. Go to the kubernetes-csi-tencentcloud/deploy/cfsturbo/kubernetes/ directory and upload csi-node-rbac.yaml, csi-node.yaml, and csidriver-new.yaml files to the kubectl management node.
3. Go to the kubernetes-csi-tencentcloud/deploy/cfsturbo/examples/ directory and download the pv.yaml, pvc.yaml, and pod.yaml sample files.
4. Modify the pv.yaml, pvc.yaml, and pod.yaml files based on the PV, PVC, and Pod attributes, such as name and image address. Below are the sample YAML files:
apiVersion: v1
kind: PersistentVolume
metadata:
name: csi-cfsturbo-pv
spec:
accessModes:
- ReadWriteMany
capacity:
storage: 10Gi
csi:
driver: com.tencent.cloud.csi.cfsturbo
# volumeHandle in PV must be unique, use pv name is better
volumeHandle: csi-cfsturbo-pv
volumeAttributes:
# cfs turbo proto
proto: lustre
# cfs turbo rootdir
rootdir: /cfs
# cfs turbo fsid (not cfs id)
fsid: d3dcc487
# cfs turbo server ip
host: 10.0.1.16
# cfs turbo subPath
path: /
storageClassName: ""
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: csi-cfsturbo-pvc
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 10Gi
# You can specify the pv name manually or just let Kubernetes bind the pv and pvc.
volumeName: csi-cfsturbo-pv
# cfsturbo only supports static provisioning, the StorageClass name should be empty.
storageClassName: ""
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
k8s-app: csi-cfsturbo-pod
name: csi-cfsturbo-pod
spec:
replicas: 1
selector:
matchLabels:
k8s-app: csi-cfsturbo-pod
template:
metadata:
labels:
k8s-app: csi-cfsturbo-pod
spec:
containers:
- image: nginx
name: csi-cfsturbo-pod
volumeMounts:
- mountPath: /csi-cfsturbo
name: csi-cfsturbo
volumes:
- name: csi-cfsturbo
persistentVolumeClaim:
# Replaced by your pvc name.
claimName: csi-cfsturbo-pvc

Below is the sample command for mounting:
sudo mount.lustre -o sync,user_xattr 10.0.1.16@tcp0:/d3dcc487/cfs /path/to/mount
Below are key parameters:
proto:lustre: Keep this parameter unchanged.
roodir:/cfs: Keep this parameter unchanged.
fsid:d3dcc487: Here, fsid is not the CFSID, and you need to enter the information in the mount directory.
host:10.0.1.16: IP of the mount point.
path: You can adjust it based on the target subdirectory. To directly mount the root directory, enter "/".
5. Run the following commands in sequence in the directory where the script is uploaded:
Configure RBAC and CSI plugins.
kubectl apply -f csi-node-rbac.yaml && kubectl apply -f csidriver-new.yaml && kubectl apply -f csi-node.yaml
Create PV, PVC, and Pod:
kubectl create -f pv.yaml && kubectl create -f pvc.yaml && kubectl create -f pod.yaml
6. Run the following command to view the Pod status:
kubectl get pod -n default -o wide
If the message below is displayed, the Pod is created successfully.


If the value of STATUS is ContainerCreating, the creation failed. You can view the failure reason based on the events in the TKE console.

ヘルプとサポート

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

フィードバック