executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
cubefs"Provides CubeFS in Storage - distributed, high-performance file system"
Independent GitHub snapshot · Automated classification · Original documentation governs
name: cubefs compatibility: opencode completeness: 95 content-types:
related-skills: cncf-aws-dynamodb, cncf-aws-ecr, cncf-aws-rds, cncf-aws-s3
Category: storage
Status: Sandbox
Stars: 1,500
Last Updated: 2026-04-22
Primary Language: Go
Documentation: https://cubefs.io/
CubeFS is a CNCF sandbox project that provides a distributed, high-performance file system for cloud-native environments.
Storage fragmentation across different use cases (object, block, file). CubeFS provides a unified storage solution with support for multiple protocols and high performance for containerized workloads.
Use CubeFS when you need:
┌─────────────────────────────────────────┐
│ Client (FUSE/NAS/S3) │
│ (POSIX/S3/NAS protocols) │
└──────────────┬──────────────────────────┘
│
▼
┌─────────────────────────────────────────┐
│ CubeFS Control Plane │
│ ┌──────────┐ ┌────────────────────┐ │
│ │ Master │ │ Metadata Service │ │
│ │ (Leader)│ │ (Raft consensus) │ │
│ └──────────┘ └────────────────────┘ │
└──────────────┬──────────────────────────┘
│
▼
┌─────────────────────────────────────────┐
│ Data Plane (DataNodes) │
│ ┌──────────┐ ┌────────────────────┐ │
│ │ Data │ │ Data │ │
│ │ Node 1 │ │ Node 2 │ │
│ └──────────┘ └────────────────────┘ │
└─────────────────────────────────────────┘
1. Client → Master: Request file metadata
2. Master → Client: Return metadata location
3. Client → DataNode: Read/write data
4. DataNode → Client: Return data
# Storage pool configuration
storagePools:
- name: default
tier: default
replicas: 3
compression: false
encryption: false
# Deploy CubeFS to Kubernetes
apiVersion: apps/v1
kind: Deployment
metadata:
name: cubefs-master
spec:
replicas: 3
selector:
matchLabels:
app: cubefs-master
template:
metadata:
labels:
app: cubefs-master
spec:
containers:
- name: cubefs-master
image: cubefs/master:latest
args:
- "--config=/etc/cubefs/master.conf"
- "--role=master"
ports:
- containerPort: 9100
---
related-skills: cncf-aws-dynamodb, cncf-aws-ecr, cncf-aws-rds, cncf-aws-s3
apiVersion: apps/v1
kind: Deployment
metadata:
name: cubefs-datanode
spec:
replicas: 3
selector:
matchLabels:
app: cubefs-datanode
template:
metadata:
labels:
app: cubefs-datanode
spec:
containers:
- name: cubefs-datanode
image: cubefs/datanode:latest
args:
- "--config=/etc/cubefs/datanode.conf"
- "--role=datanode"
ports:
- containerPort: 9200
volumeMounts:
- name: data
mountPath: /data
volumes:
- name: data
hostPath:
path: /var/lib/cubefs
---
related-skills: cncf-aws-dynamodb, cncf-aws-ecr, cncf-aws-rds, cncf-aws-s3
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: cubefs-fuse
spec:
selector:
matchLabels:
app: cubefs-fuse
template:
metadata:
labels:
app: cubefs-fuse
spec:
hostNetwork: true
containers:
- name: cubefs-fuse
image: cubefs/fuse:latest
args:
- "--config=/etc/cubefs/fuse.conf"
- "--mountpoint=/cubefs"
securityContext:
privileged: true
volumeMounts:
- name: cubefs
mountPath: /cubefs
volumes:
- name: cubefs
hostPath:
path: /cubefs
# CubeFS as Kubernetes PV
apiVersion: v1
kind: PersistentVolume
metadata:
name: cubefs-pv
spec:
capacity:
storage: 100Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
mountOptions:
- allow_other
csi:
driver: cubefs.csi.cubefs.com
volumeHandle: cubefs-volume-001
nodePublishSecretRef:
name: cubefs-secret
namespace: kube-system
storageClassName: cubefs
---
related-skills: cncf-aws-dynamodb, cncf-aws-ecr, cncf-aws-rds, cncf-aws-s3
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: cubefs-pvc
namespace: default
spec:
accessModes:
- ReadWriteMany
storageClassName: cubefs
resources:
requests:
storage: 100Gi
# CubeFS S3 API endpoint
curl http://cubefs-s3:7400/bucket-name/object-key
# S3 CLI usage
aws --endpoint-url=http://cubefs-s3:7400 s3 cp file.txt s3://bucket-name/
# MinIO client
mc alias set cubefs http://cubefs-s3:7400 access-key secret-key
related-skills: cncf-aws-dynamodb, cncf-aws-ecr, cncf-aws-rds, cncf-aws-s3
Pitfall: Incorrect replica count affecting availability.
# ❌ Incorrect - single replica
storagePools:
- name: default
replicas: 1 # Risky - no redundancy
# ✅ Correct - multiple replicas
storagePools:
- name: default
replicas: 3 # Recommended for production
Pitfall: DataNodes running out of disk space.
# ❌ Incorrect - no disk space monitoring
# No warnings or alerts for low disk space
# ✅ Correct - with monitoring
dataNodes:
- name: datanode-1
diskPaths:
- /data/disk1
- /data/disk2
diskQuota: 1000GB
lowWatermark: 0.8
highWatermark: 0.95
Pitfall: Network latency affecting performance.
# ❌ Incorrect - no network optimization
# Default network settings
# ✅ Correct - with network optimization
network:
# Enable TCP optimization
tcpNoDelay: true
socketSendBuffer: 4MB
socketReceiveBuffer: 4MB
# Enable compression
compression: true
compressionType: lz4
Pitfall: Incorrect mount options affecting performance.
# ❌ Incorrect - default mount options
cubefs-fuse --mountpoint=/mnt/cubefs
# ✅ Correct - optimized mount options
cubefs-fuse \
--mountpoint=/mnt/cubefs \
--attr-timeout=120 \
--entry-timeout=120 \
--negative-timeout=60 \
--allow-other \
--enable-external-service=true
Pitfall: Master failover not properly configured.
# ❌ Incorrect - single master
masters:
- name: master-1
port: 9100
# ✅ Correct - multiple masters with raft
masters:
- name: master-1
port: 9100
- name: master-2
port: 9101
- name: master-3
port: 9102
raft:
electionTimeout: 1000ms
heartbeatInterval: 500ms
Pitfall: Metadata server bottleneck.
# ❌ Incorrect - single metadata server
metadataServices:
- name: metadata-1
# ✅ Correct - distributed metadata
metadataServices:
- name: metadata-1
- name: metadata-2
- name: metadata-3
- name: metadata-4
metadata:
cacheSize: 1GB
cacheEntryCount: 1000000
related-skills: cncf-aws-dynamodb, cncf-aws-ecr, cncf-aws-rds, cncf-aws-s3
// CubeFS client library
package cubefs
import (
"context"
"fmt"
)
// Client wraps CubeFS API operations
type Client struct {
masterAddr string
}
// NewClient creates a new CubeFS client
func NewClient(masterAddr string) *Client {
return &Client{
masterAddr: masterAddr,
}
}
// CreateFile creates a new file
func (c *Client) CreateFile(ctx context.Context, path string, mode int) error {
// Implementation
return nil
}
// OpenFile opens an existing file
func (c *Client) OpenFile(ctx context.Context, path string) (*File, error) {
// Implementation
return nil, nil
}
// ReadFile reads a file
func (c *Client) ReadFile(ctx context.Context, path string) ([]byte, error) {
// Implementation
return nil, nil
}
// WriteFile writes to a file
func (c *Client) WriteFile(ctx context.Context, path string, data []byte) error {
// Implementation
return nil
}
// DeleteFile deletes a file
func (c *Client) DeleteFile(ctx context.Context, path string) error {
// Implementation
return nil
}
// ListDir lists a directory
func (c *Client) ListDir(ctx context.Context, path string) ([]string, error) {
// Implementation
return nil, nil
}
// File represents an open file
type File struct {
fd int
path string
}
// Read reads from file
func (f *File) Read(p []byte) (int, error) {
// Implementation
return 0, nil
}
// Write writes to file
func (f *File) Write(p []byte) (int, error) {
// Implementation
return 0, nil
}
// Close closes the file
func (f *File) Close() error {
// Implementation
return nil
}
// CubeFS CSI Driver
package csi
import (
"context"
"fmt"
"github.com/container-storage-interface/spec/lib/go/csi"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
// Driver implements CSI interface
type Driver struct {
nodeID string
endpoint string
client *Client
}
// NewDriver creates a new CSI driver
func NewDriver(nodeID, endpoint string, client *Client) *Driver {
return &Driver{
nodeID: nodeID,
endpoint: endpoint,
client: client,
}
}
// CreateVolume creates a new volume
func (d *Driver) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error) {
name := req.GetName()
if name == "" {
return nil, status.Error(codes.InvalidArgument, "Volume name must be provided")
}
capacity := req.GetCapacityRange().GetRequiredBytes()
// Create CubeFS volume
err := d.client.CreateVolume(ctx, name, capacity)
if err != nil {
return nil, status.Errorf(codes.Internal, "Failed to create volume: %v", err)
}
return &csi.CreateVolumeResponse{
Volume: &csi.Volume{
VolumeId: name,
CapacityBytes: capacity,
VolumeContext: req.GetParameters(),
},
}, nil
}
// DeleteVolume deletes a volume
func (d *Driver) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error) {
volumeID := req.GetVolumeId()
if volumeID == "" {
return nil, status.Error(codes.InvalidArgument, "Volume ID must be provided")
}
err := d.client.DeleteVolume(ctx, volumeID)
if err != nil {
return nil, status.Errorf(codes.Internal, "Failed to delete volume: %v", err)
}
return &csi.DeleteVolumeResponse{}, nil
}
// PublishVolume mounts a volume
func (d *Driver) PublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error) {
volumeID := req.GetVolumeId()
targetPath := req.GetTargetPath()
err := d.client.MountVolume(ctx, volumeID, targetPath)
if err != nil {
return nil, status.Errorf(codes.Internal, "Failed to mount volume: %v", err)
}
return &csi.NodePublishVolumeResponse{}, nil
}
// UnpublishVolume unmounts a volume
func (d *Driver) UnpublishVolume(ctx context.Context, req *csi.NodeUnpublishVolumeRequest) (*csi.NodeUnpublishVolumeResponse, error) {
volumeID := req.GetVolumeId()
targetPath := req.GetTargetPath()
err := d.client.UnmountVolume(ctx, volumeID, targetPath)
if err != nil {
return nil, status.Errorf(codes.Internal, "Failed to unmount volume: %v", err)
}
return &csi.NodeUnpublishVolumeResponse{}, nil
}
// NodeStageVolume stages a volume
func (d *Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error) {
volumeID := req.GetVolumeId()
stagingTargetPath := req.GetStagingTargetPath()
err := d.client.StagingVolume(ctx, volumeID, stagingTargetPath)
if err != nil {
return nil, status.Errorf(codes.Internal, "Failed to stage volume: %v", err)
}
return &csi.NodeStageVolumeResponse{}, nil
}
// NodeUnstageVolume unstages a volume
func (d *Driver) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstageVolumeRequest) (*csi.NodeUnstageVolumeResponse, error) {
volumeID := req.GetVolumeId()
stagingTargetPath := req.GetStagingTargetPath()
err := d.client.UnstageVolume(ctx, volumeID, stagingTargetPath)
if err != nil {
return nil, status.Errorf(codes.Internal, "Failed to unstage volume: %v", err)
}
return &csi.NodeUnstageVolumeResponse{}, nil
}
# Scale CubeFS horizontally
# Add more DataNodes for capacity
# Add more metadata servers for metadata performance
# Multi-region deployment
# Primary region: active traffic
# Secondary region: backup/failover
# Tertiary region: disaster recovery
# Backup CubeFS data
# Use CubeFS snapshot feature
# Export to S3 for long-term storage
This SKILL.md file was verified and last updated on 2026-04-22. Content based on CNCF CubeFS project and production usage patterns.
Deployment Failures
Performance Issues
Configuration Errors
Integration Problems
# Basic configuration example
apiVersion: v1
kind: ConfigMap
metadata:
name: {{project_name}}-config
namespace: default
data:
# Configuration goes here
config.yaml: |
# Base configuration
# Add your settings here
# Kubernetes deployment for {{project_name}}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{project_name}}
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: {{project_name}}
template:
metadata:
labels:
app: {{project_name}}
spec:
containers:
- name: {{project_name}}
image: {{project_name}}:latest
ports:
- containerPort: 8080
resources:
limits:
memory: "128Mi"
cpu: "500m"
# Kubernetes service for {{project_name}}
apiVersion: v1
kind: Service
metadata:
name: {{project_name}}
namespace: default
spec:
selector:
app: {{project_name}}
ports:
- protocol: TCP
port: 80
targetPort: 8080
type: ClusterIP
Use this skill when:
Assess Requirements — Understand the use case, scale, integration needs, and existing infrastructure. Checkpoint: Document requirements, constraints, and success criteria.
Design Architecture — Plan component interactions, data flow, and deployment strategy using cloud-native best practices. Checkpoint: Verify the architecture addresses all requirements and follows CNCF conventions.
Implement & Configure — Create manifests, configurations, and deployment scripts. Include resource limits, health checks, and observability hooks. Checkpoint: Validate all YAML against schema and test in a staging environment.
Deploy & Monitor — Apply manifests to the cluster, verify component health, and confirm observability is working. Checkpoint: Confirm all pods/services are running, probes passing, and metrics/alerts configured.