kubeblocks

Provision and manage production-grade databases on Kubernetes using KubeBlocks. Use this skill when the user needs a database — MySQL, PostgreSQL, Redis, MongoDB, Kafka, Elasticsearch, Milvus, Qdrant, RabbitMQ, or any other data infrastructure — and has (or is willing to set up) a Kubernetes environment. Trigger phrases include "I need a database", "set up MySQL", "spin up Postgres", "deploy a vector database for RAG", "I need a message queue", or any request involving database provisioning, scaling, backup, restore, monitoring, or troubleshooting on Kubernetes. Also use when the user explicitly mentions KubeBlocks, or wants to manage existing KubeBlocks-managed database clusters.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "kubeblocks" with this command: npx skills add earayu/kubeblocks-skills

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 IntentSkill
Create a local K8s test clustercreate-local-k8s-cluster
Install KubeBlocks operatorinstall-kubeblocks
Install/manage database engine addonsmanage-addons

Create a Database

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

Day-2 Operations

User IntentSkill
Stop / Start / Restart a clustercluster-lifecycle
Scale CPU / Memory (vertical)vertical-scaling
Add / remove replicas or shardshorizontal-scaling
Expand storage volumevolume-expansion
Change database parametersreconfigure-parameters
Primary / secondary switchoverswitchover
Upgrade database engine versionminor-version-upgrade
Rebuild a failed replicarebuild-replica
Upgrade KubeBlocks operatorupgrade-kubeblocks

Data Protection

User IntentSkill
Backup cluster databackup
Restore from backup / PITRrestore

Security & Networking

User IntentSkill
Manage database passwords / accountsmanage-accounts
Configure TLS / mTLS encryptionconfigure-tls
Expose service externally (LoadBalancer/NodePort)expose-service

Observability

User IntentSkill
Setup monitoring (Prometheus/Grafana)setup-monitoring

Troubleshooting

User IntentSkill
Cluster not working, error, failed, stuck, CrashLoopBackOfftroubleshoot

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 CaseRecommended EngineWhy
Web app backend, relational data, SQLPostgreSQLMost versatile, strong ecosystem
Legacy app compatibility, MySQL protocolMySQLDrop-in for MySQL-dependent apps
Caching, sessions, rate limitingRedisSub-millisecond latency, simple API
Flexible schema, document storageMongoDBSchema-free, horizontal scaling
Event streaming, log pipelinesKafkaHigh throughput, durable ordered streams
Full-text search, log analyticsElasticsearchInverted index, powerful query DSL
AI embeddings, similarity search, RAGMilvus or QdrantPurpose-built vector indexes
Task queues, pub/sub messagingRabbitMQFlexible routing, multiple protocols

Disambiguation Guide

"Scale" ambiguity

User saysSkill
"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 saysSkill
"delete", "remove", "destroy", "drop" (permanent)delete-cluster
"stop", "pause", "shut down" (temporary, keeps data)cluster-lifecycle

"Upgrade" ambiguity

User saysSkill
"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 <cluster-name> -n <namespace>
kubectl get opsrequest -n <namespace>
kubectl get component -n <namespace>
kubectl logs -n <namespace> <pod-name> -c <container-name>
kubectl -n kb-system logs -l app.kubernetes.io/name=kubeblocks --tail=100

Documentation Links

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Google Classroom

Google Classroom API integration with managed OAuth. Manage courses, assignments, students, teachers, and announcements. Use this skill when users want to cr...

Registry SourceRecently Updated
General

GetResponse

GetResponse API integration with managed OAuth. Manage email marketing campaigns, contacts, newsletters, autoresponders, and segments. Use this skill when us...

Registry SourceRecently Updated
General

Antenna

Inter-host OpenClaw session messaging over reachable HTTPS using built-in gateway webhook hooks. Use when: (1) sending a message from this OpenClaw instance...

Registry SourceRecently Updated
General

Buffer

Buffer API integration with managed authentication. Schedule and manage social media posts across multiple platforms. Use this skill when users want to sched...

Registry SourceRecently Updated