longhorn
Use when the user asks about Longhorn on Kubernetes, Longhorn volumes and replicas, backup targets (S3 or NFS), recurring snapshots, disaster recovery…
от j4flmao★ 47 звёзд на GitHub
Установить longhorn в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Longhorn Storage
Purpose
Define and enforce Longhorn distributed storage patterns for installation, volume management, backup, and DR.
Agent Protocol
Trigger
User request includes: longhorn, distributed storage, block storage, rancher longhorn, persistent volume, storageclass, backup target, disaster recovery, volume snapshot, longhorn replication.
Input Context
- Kubernetes cluster version and size
- Existing storage solution (if migrating)
- Storage requirements (IOPS, capacity, replication factor)
- Backup target (S3, NFS, SMB)
- Network configuration (nodes, disks)
Output Artifact
A markdown document containing:
- Longhorn installation method (Helm, Rancher Marketplace)
- StorageClass configuration with parameters
- Volume scheduling and replica strategy
- Backup and disaster recovery setup
- Performance tuning (disk selection, network, settings)
- Monitoring and alerting configuration
- Upgrade and maintenance procedures
Response Format
Produce the artifact directly. No preamble, no postamble, no explanations. No filler, no hedging, no transitions. Strip articles a/an/the where unambiguous. Compress output -- why use many token when few do trick.
Completion Criteria
- Installation method selected with version
- StorageClass defined with replica count and parameters
- Backup target configured with schedule
- DR volume strategy documented
- Monitoring integration with Prometheus/Grafana
Max Response Length
4096 tokens
Workflow
Step 1: Install Longhorn via Helm
helm repo add longhorn https://charts.longhorn.io
helm repo update
helm install longhorn longhorn/longhorn \
--namespace longhorn-system \
--create-namespace \
--set defaultSettings.replicaCount=3 \
--set defaultSettings.defaultDataPath="/var/lib/longhorn" \
--set persistence.defaultClassReplicaCount=3 \
--version <tested-chart-version> # pin the release you validated; check longhorn.io for supported versions
Pre-requisites:
| Requirement | Minimum | Recommended |
|---|---|---|
| Kubernetes | Per Longhorn release support matrix (recent 1.9/1.10 releases need ≥ 1.25) | A currently supported Kubernetes minor |
| Nodes | 3 (for HA) | 3+ |
| CPU per node | 1 core | 4 cores |
| RAM per node | 2 GB | 8 GB |
| Disk per node | 40 GB (SSD) | 200 GB (NVMe) |
| Network | Node-to-node traffic for longhorn-manager (9500) and replica/engine data ports | See Longhorn networking docs |
| iscsiadm | Required | -- |
| open-iscsi | Required | -- |
| nfs-client | Required (for backup) | -- |
Step 2: Configure StorageClasses
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: longhorn-fast
provisioner: driver.longhorn.io
allowVolumeExpansion: true
reclaimPolicy: Delete
volumeBindingMode: Immediate
parameters:
numberOfReplicas: "3"
staleReplicaTimeout: "30"
fromBackup: ""
fsType: ext4
dataLocality: best-effort
replicaAutoBalance: best-effort
diskSelector: ""
nodeSelector: ""
recurringJobSelector: ""
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: longhorn-slow
provisioner: driver.longhorn.io
allowVolumeExpansion: true
reclaimPolicy: Retain
volumeBindingMode: WaitForFirstConsumer
parameters:
numberOfReplicas: "1"
dataLocality: disabled
replicaAutoBalance: disabled
Step 3: Apply Replica Strategy
| Replicas | Fault Tolerance | Storage Cost | Use Case |
|---|---|---|---|
| 1 | No tolerance | 1x | Dev/test, non-critical |
| 2 | 1 node failure | 2x | Semi-critical (not recommended) |
| 3 | 1 node failure | 3x | Production (default) |
| 4+ | 2+ node failures | 4x+ | Critical, multi-AZ |
Step 4: Configure Backup
Backup Target Setup
# Settings -> Backup
backupTarget: "s3://my-backup-bucket@us-east-1/"
backupTargetCredentialSecret: longhorn-backup-secret
# Secret for S3 backup target
apiVersion: v1
kind: Secret
metadata:
name: longhorn-backup-secret
namespace: longhorn-system
stringData:
AWS_ACCESS_KEY_ID: "AKIA..."
AWS_SECRET_ACCESS_KEY: "..."
AWS_ENDPOINTS: "https://s3.us-east-1.amazonaws.com"
Recurring Job
# Recurring backup schedule
apiVersion: longhorn.io/v1beta2
kind: RecurringJob
metadata:
name: daily-backup
namespace: longhorn-system
spec:
cron: "0 2 * * *"
task: backup
retain: 7
concurrency: 2
labels:
backup-type: daily
Step 5: Set Up Disaster Recovery
DR Volume
apiVersion: longhorn.io/v1beta2
kind: Volume
metadata:
name: dr-volume-orders
namespace: longhorn-system
spec:
fromBackup: "s3://backup-bucket@us-east-1/backup/orders-v1"
numberOfReplicas: 3
staleReplicaTimeout: 30
nodeSelector:
region: dr-region
DR Process:
- Create DR volume from backup in DR cluster
- Activate DR volume when primary down
- Point applications to DR volume
- When primary recovered, reverse sync
Step 6: Tune Performance
| Parameter | Set
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/longhorn-advanced.md
- references/longhorn-backup.md
- references/longhorn-config.md
- references/longhorn-disaster-recovery.md
- references/longhorn-fundamentals.md
- references/longhorn-manager.md
- references/longhorn-perf.md
- references/longhorn-performance-tuning.md
FAQ
Что делает скилл longhorn?
Use when the user asks about Longhorn on Kubernetes, Longhorn volumes and replicas, backup targets (S3 or NFS), recurring snapshots, disaster recovery volumes, the V2 data engine, Longhorn performance, or degraded volumes. Produces Longhorn install, StorageClass and backup configs. Not for Ceph or SAN design (use storage-infrastructure).
Как установить скилл longhorn?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл longhorn запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…