← 返回 Skills 市场
earayu

Kubeblocks

作者 earayu · GitHub ↗ · v0.2.0 · MIT-0
cross-platform ✓ 安全检测通过
268
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install kubeblocks-skills
功能描述
Provision and manage production-grade databases on Kubernetes using KubeBlocks. Use this skill when the user needs a database — MySQL, PostgreSQL, Redis, Mon...
使用说明 (SKILL.md)

KubeBlocks — Databases on Kubernetes, Made Simple

When To Use This Skill

Use this skill when:

  • The user needs a database and has (or is willing to set up) a Kubernetes environment
  • The user asks to "set up", "create", "deploy", "spin up", or "provision" a database on Kubernetes
  • The user mentions a database engine (MySQL, PostgreSQL, Redis, MongoDB, Kafka, Elasticsearch, Milvus, Qdrant, RabbitMQ, etc.) in the context of deployment or operations
  • The user needs database operations on K8s: scaling, backup, restore, monitoring, failover, parameter tuning
  • The user is troubleshooting a KubeBlocks-managed database
  • The user mentions KubeBlocks directly

When NOT to use this skill: If the user only needs a connection string to an existing managed database service (e.g., AWS RDS, Google Cloud SQL), or wants to run a database directly via Docker Compose without Kubernetes, this skill is not the right fit.

If the user doesn't have a Kubernetes cluster yet but wants one, this skill set includes creating a local K8s cluster for development and testing.

What is KubeBlocks?

KubeBlocks is a Kubernetes operator that manages 30+ database engines on any K8s cluster. It provides a unified API for the full lifecycle — from provisioning and scaling to backup, restore, and observability — across relational, NoSQL, streaming, vector, and graph databases.

Quick Status Check

Before performing any operation, verify the current state:

# Check if KubeBlocks is installed
kubectl -n kb-system get pods

# List all database clusters across namespaces
kubectl get cluster -A

# Check KubeBlocks version
helm list -n kb-system | grep kubeblocks

If KubeBlocks is not installed, start with the install-kubeblocks skill. If there is no Kubernetes cluster at all, start with create-local-k8s-cluster.

Skill Map

Read the skill that matches the user's intent. Each skill is a self-contained guide with YAML templates, step-by-step workflow, and troubleshooting.

Getting Started

User Intent Skill
Create a local K8s test cluster create-local-k8s-cluster
Install KubeBlocks operator install-kubeblocks
Install/manage database engine addons manage-addons

Create a Database

User Intent Skill
Create a MySQL cluster addon-mysql
Create a PostgreSQL cluster addon-postgresql
Create a Redis cluster addon-redis
Create a MongoDB cluster addon-mongodb
Create a Kafka cluster addon-kafka
Create an Elasticsearch cluster addon-elasticsearch
Create a Milvus (vector DB) cluster addon-milvus
Create a Qdrant (vector DB) cluster addon-qdrant
Create a RabbitMQ cluster addon-rabbitmq
Create any other database (generic) create-cluster
Delete a database cluster delete-cluster

Day-2 Operations

User Intent Skill
Stop / Start / Restart a cluster cluster-lifecycle
Scale CPU / Memory (vertical) vertical-scaling
Add / remove replicas or shards horizontal-scaling
Expand storage volume volume-expansion
Change database parameters reconfigure-parameters
Primary / secondary switchover switchover
Upgrade database engine version minor-version-upgrade
Rebuild a failed replica rebuild-replica
Upgrade KubeBlocks operator upgrade-kubeblocks

Data Protection

User Intent Skill
Backup cluster data backup
Restore from backup / PITR restore

Security & Networking

User Intent Skill
Manage database passwords / accounts manage-accounts
Configure TLS / mTLS encryption configure-tls
Expose service externally (LoadBalancer/NodePort) expose-service

Observability

User Intent Skill
Setup monitoring (Prometheus/Grafana) setup-monitoring

Troubleshooting

User Intent Skill
Cluster not working, error, failed, stuck, CrashLoopBackOff troubleshoot

Decision Tree

Use this when the user's intent needs clarification:

User needs a database
├─ Is KubeBlocks installed?
│  ├─ No  → Do they have a K8s cluster?
│  │        ├─ No  → create-local-k8s-cluster → install-kubeblocks
│  │        └─ Yes → install-kubeblocks
│  └─ Yes → Continue below
│
├─ Create a database
│  ├─ Is the engine addon installed?
│  │  ├─ No  → manage-addons → then create cluster
│  │  └─ Yes → Which engine?
│  │           ├─ MySQL/PG/Redis/MongoDB/Kafka/ES/Milvus/Qdrant/RabbitMQ → addon-{engine}
│  │           └─ Other → create-cluster (generic)
│  └─ Don't know which engine? → Recommend based on use case:
│     ├─ Relational / SQL         → addon-postgresql or addon-mysql
│     ├─ Cache / session store    → addon-redis
│     ├─ Document store           → addon-mongodb
│     ├─ Event streaming          → addon-kafka
│     ├─ Full-text search / logs  → addon-elasticsearch
│     ├─ Vector similarity / RAG  → addon-milvus or addon-qdrant
│     └─ Message queue            → addon-rabbitmq or addon-kafka
│
├─ Operate an existing database
│  ├─ Scale CPU/Memory      → vertical-scaling
│  ├─ Add/remove replicas   → horizontal-scaling
│  ├─ Expand disk            → volume-expansion
│  ├─ Change DB config       → reconfigure-parameters
│  ├─ Switchover primary     → switchover
│  ├─ Upgrade DB version     → minor-version-upgrade
│  ├─ Rebuild failed replica → rebuild-replica
│  ├─ Stop / Start / Restart → cluster-lifecycle
│  └─ Delete permanently     → delete-cluster
│
├─ Protect data
│  ├─ Backup                 → backup
│  └─ Restore / PITR         → restore
│
├─ Secure the database
│  ├─ Manage passwords       → manage-accounts
│  ├─ Enable TLS/SSL         → configure-tls
│  └─ Expose externally      → expose-service
│
├─ Monitor                   → setup-monitoring
├─ Upgrade KubeBlocks itself → upgrade-kubeblocks
└─ Something is broken       → troubleshoot

Engine Recommendation Guide

When the user needs a database but hasn't chosen an engine, recommend based on their use case:

Use Case Recommended Engine Why
Web app backend, relational data, SQL PostgreSQL Most versatile, strong ecosystem
Legacy app compatibility, MySQL protocol MySQL Drop-in for MySQL-dependent apps
Caching, sessions, rate limiting Redis Sub-millisecond latency, simple API
Flexible schema, document storage MongoDB Schema-free, horizontal scaling
Event streaming, log pipelines Kafka High throughput, durable ordered streams
Full-text search, log analytics Elasticsearch Inverted index, powerful query DSL
AI embeddings, similarity search, RAG Milvus or Qdrant Purpose-built vector indexes
Task queues, pub/sub messaging RabbitMQ Flexible routing, multiple protocols

Disambiguation Guide

"Scale" ambiguity

User says Skill
"scale up", "more CPU", "more memory", "resize" vertical-scaling
"add replicas", "more nodes", "scale out", "add shards" horizontal-scaling
"more disk", "more storage", "expand volume" volume-expansion

"Delete" vs "Stop"

User says Skill
"delete", "remove", "destroy", "drop" (permanent) delete-cluster
"stop", "pause", "shut down" (temporary, keeps data) cluster-lifecycle

"Upgrade" ambiguity

User says Skill
"upgrade MySQL/PG version", "patch database" minor-version-upgrade
"upgrade KubeBlocks", "update operator" upgrade-kubeblocks

Safety Patterns

Before performing any cluster-modifying operation, review the safety-patterns reference. Key rules:

  • Dry-run before apply: Always run kubectl apply --dry-run=server before any real kubectl apply.
  • Confirm before destructive actions: Deletions, scale-in, stop, and terminationPolicy changes require explicit user confirmation. List backups and affected resources first.
  • Credential handling: Commands like kubectl get secret ... -o jsonpath expose database passwords. Only run these when the user explicitly requests credentials, and warn that the output contains sensitive data.
  • kubectl exec: Entering database pods (kubectl exec -it) gives shell access to production data. Always confirm with the user before executing.
  • Production protection: Clusters with terminationPolicy: DoNotTerminate should be treated with extra caution. Recommend backups before risky operations (upgrade, switchover, reconfigure).

Common Debugging Commands

kubectl describe cluster \x3Ccluster-name> -n \x3Cnamespace>
kubectl get opsrequest -n \x3Cnamespace>
kubectl get component -n \x3Cnamespace>
kubectl logs -n \x3Cnamespace> \x3Cpod-name> -c \x3Ccontainer-name>
kubectl -n kb-system logs -l app.kubernetes.io/name=kubeblocks --tail=100

Documentation Links

Resource URL
Introduction https://kubeblocks.io/docs/preview/user_docs/overview/introduction
Supported Addons https://kubeblocks.io/docs/preview/user_docs/overview/supported-addons
Full LLM Index https://kubeblocks.io/llms-full.txt
GitHub Repository https://github.com/apecloud/kubeblocks
Releases https://github.com/apecloud/kubeblocks/releases
安全使用建议
This skill appears to do exactly what it says: provide step-by-step guidance to install and operate KubeBlocks-managed databases on Kubernetes. Before you install or enable it, verify the following: 1) The SKILL.md requires kubectl, helm, and access to a kubeconfig — ensure any agent running this skill is given only the minimal Kubernetes credentials necessary (avoid cluster-admin if possible and prefer a least-privilege service account / namespace-scoped credentials). 2) Because the skill uses kubectl to read Secrets (database passwords) and run applies/deletes, only enable it in environments you trust (prefer a dev/test cluster for initial use). 3) Note the repository metadata does not list the runtime requirements (kubectl/helm/kubeconfig) — treat that as a metadata omission and ensure the agent environment meets the SKILL.md requirements. 4) Require explicit user confirmation before destructive operations (delete, wipeout, terminationPolicy changes) — the SKILL.md recommends this, but make sure your agent enforces it. If you need higher assurance, review the individual engine SKILL.md files for the exact kubectl/helm commands and dry-run patterns before granting the agent live cluster access.
功能分析
Type: OpenClaw Skill Name: kubeblocks-skills Version: 0.2.0 This skill bundle provides a comprehensive and well-structured set of instructions for managing KubeBlocks and over 30 database engines on Kubernetes. It includes detailed workflows for installation, provisioning, Day-2 operations, and security management. Notably, it incorporates a 'safety-patterns.md' reference that enforces best practices like server-side dry-runs and explicit user confirmation for destructive actions. All external downloads (e.g., in kubeblocks-install/SKILL.md and kubeblocks-create-local-k8s-cluster/SKILL.md) target official sources such as GitHub and Helm, and no malicious logic or data exfiltration attempts were detected.
能力评估
Purpose & Capability
The skill's name and description (manage DBs on Kubernetes with KubeBlocks) match the instructions and included engine-specific guides. However, the repository metadata declares no required binaries or config paths, while the SKILL.md frontmatter and content clearly require kubectl, helm and access to a kubeconfig (a Kubernetes cluster). This is a metadata omission/inconsistency, not a functional mismatch.
Instruction Scope
All runtime instructions (kubectl, helm, kubectl port-forward, kubectl exec, reading Kubernetes Secrets via kubectl get secret, dry-run then apply, watch resource status) are narrowly scoped to provisioning and operating KubeBlocks-managed database clusters. The instructions do not attempt to read unrelated host files or reach unusual external endpoints — only official docs, Helm charts, and cluster APIs are referenced.
Install Mechanism
This is instruction-only (no install spec, no code files to execute). The README suggests installing the skill repo via git clone or npx, which is common for skills; no arbitrary download URLs or binary installations are baked into the skill itself. Risk from installation is low, but installing the repo to an agent still involves pulling third-party content (standard GitHub workflow).
Credentials
The skill does not declare required environment variables or credentials in the registry metadata, but the SKILL.md explicitly requires access to a Kubernetes cluster (kubeconfig) and will read cluster Secrets (e.g., database passwords). Requiring kubeconfig / cluster-admin level access is proportionate to the stated purpose, but the lack of declared config paths or a primary credential in the metadata is an omission that could mislead users about what permissions an agent will need.
Persistence & Privilege
always:false and default autonomous invocation settings are used. The skill does not request persistent presence or modify other skills. Note: autonomous invocation is the platform default — if you grant this skill access to a kubeconfig with broad privileges, the agent could make live changes to clusters; that is expected for a provisioning/ops skill but worth being cautious about.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install kubeblocks-skills
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /kubeblocks-skills 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.2.0
Version 0.2.0 of kubeblocks-skills brings updates to skill metadata and usage guidance. - Added top-level compatibility section specifying required/optional tools and Kubernetes cluster requirements. - Adjusted description and "When To Use" section to clarify scope, including explicit exclusions (e.g., external managed DBs, direct Docker Compose). - Made metadata more concise and standardized fields (moved version to top). - Improved phrasing for clearer guidance on when to apply the skill. - No workflow, command, or step changes—skill map and structure remain unchanged.
v0.1.0
Initial release of kubeblocks-skills for streamlined database operations on Kubernetes. - Provides comprehensive skill guides for provisioning, managing, and troubleshooting 30+ database engines using KubeBlocks on any Kubernetes cluster. - Includes quick-start instructions, intent-based skill map, and a detailed decision tree for selecting the appropriate workflow. - Covers day-2 operations such as scaling, backup, restore, upgrades, monitoring, and troubleshooting. - Ready-to-use for MySQL, PostgreSQL, Redis, MongoDB, Kafka, Elasticsearch, Milvus, Qdrant, RabbitMQ, and more. - Guides support users who may not be familiar with Kubernetes or KubeBlocks, offering paths for local cluster creation and installation.
元数据
Slug kubeblocks-skills
版本 0.2.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Kubeblocks 是什么?

Provision and manage production-grade databases on Kubernetes using KubeBlocks. Use this skill when the user needs a database — MySQL, PostgreSQL, Redis, Mon... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 268 次。

如何安装 Kubeblocks?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install kubeblocks-skills」即可一键安装,无需额外配置。

Kubeblocks 是免费的吗?

是的,Kubeblocks 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Kubeblocks 支持哪些平台?

Kubeblocks 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Kubeblocks?

由 earayu(@earayu)开发并维护,当前版本 v0.2.0。

💬 留言讨论