skills/kubeblocks-preflight/SKILL.md
Check whether a Kubernetes environment is ready for first-time KubeBlocks database rollout, then emit an environment profile / recommendation bundle for downstream engine-entry skills. Use this before provisioning MySQL, PostgreSQL, Redis, MongoDB, Kafka, or any other database when rollout readiness is still unknown.
npx skillsauth add apecloud/kubeblocks-skills kubeblocks-preflightInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Run this skill after KubeBlocks is installed but before first-time database provisioning.
Its job is not only to inspect the cluster. It must also produce a stable environment profile / recommendation bundle that downstream engine-entry skills can use directly.
Use this skill when any of the following is true:
Do not skip this step for high-frequency engines such as MySQL or PostgreSQL when rollout readiness is still unknown.
- [ ] Step 1: Confirm cluster access and namespace assumptions
- [ ] Step 2: Inspect storage and topology risks
- [ ] Step 3: Inspect addon and snapshot prerequisites
- [ ] Step 4: Inspect monitoring baseline
- [ ] Step 5: Emit the recommendation bundle
kubectl config current-context
kubectl get nodes -o wide
kubectl get ns
Capture:
This is the most important gate for real deployments.
kubectl get storageclass
kubectl get storageclass -o yaml
kubectl get nodes -L topology.kubernetes.io/zone,failure-domain.beta.kubernetes.io/zone
Check and record:
StorageClass existsstorageClassNamevolumeBindingModeImmediate binding can create PV node affinity riskallowVolumeExpansion is enabledIf the cluster is multi-AZ and the selected class binds volumes immediately to a single zone, mark that as a rollout risk and recommend a topology-aware class with WaitForFirstConsumer.
helm list -n kb-system
kubectl get volumesnapshotclass 2>/dev/null || true
kubectl api-resources | grep -i snapshot || true
Check and record:
kubectl get pods -A | grep -E 'prometheus|grafana' || true
kubectl get servicemonitor,podmonitor -A 2>/dev/null || true
Decide which observability path is appropriate:
existing-stack: Prometheus / Grafana already exists and only integration is neededbootstrap-stack: no usable monitoring base exists yetAlso note if exporter presence is enough for now (metrics-ready) or if the user expects dashboards / alerting.
The output of this skill must be structured enough for downstream skills to consume directly.
Use the schema in references/recommendation-bundle.md.
At minimum, produce:
environmentProfile:
clusterType: ack
multiAZ: true
targetNamespace: demo
recommendations:
storage:
storageClassName: alicloud-disk-topology-alltype
volumeBindingMode: WaitForFirstConsumer
topologyAwareRequired: true
engineEntry:
recommendedSkill: kubeblocks-addon-postgresql
forbiddenGenericPaths:
- kubeblocks-create-cluster
sizing:
defaultTier: demo
observability:
recommendedSkill: kubeblocks-observability-existing-stack
readinessTarget: scrape-ready
risks:
- multi-AZ cluster + immediate-binding storage can strand PVCs in the wrong zone
Preflight is complete only when:
storageClassName is selectedIf you cannot answer those five items, preflight is incomplete.
devops
Expand persistent volume storage for KubeBlocks database clusters via OpsRequest. Requires the StorageClass to support volume expansion (allowVolumeExpansion=true). Use when the user needs more disk space, wants to increase storage, expand volumes, or resize PVCs. NOT for changing CPU/memory (see vertical-scaling) or adding more replicas (see horizontal-scaling). Note that volume shrinking is not supported by Kubernetes.
data-ai
Scale CPU and memory resources for KubeBlocks database clusters via OpsRequest (vertical scaling). Supports in-place updates when the feature gate is enabled. Use when the user wants to change, increase, decrease, resize, or adjust CPU or memory resources of a database cluster. NOT for adding/removing replicas or shards (see horizontal-scaling) or expanding disk storage (see volume-expansion).
data-ai
Upgrade the KubeBlocks operator itself via Helm. Covers update operator, upgrade to v1.0, update kubeblocks version, and CRD updates. Use when the user wants to upgrade KubeBlocks, update the operator, or upgrade to a new KubeBlocks release. NOT for upgrading database engine versions (see minor-version-upgrade).
development
Diagnostic guide for KubeBlocks-managed database clusters. Use when the user reports troubleshoot, debug, diagnose, not working, error, failed, stuck, CrashLoopBackOff, cluster exception, or similar problems with their database cluster. This skill guides the agent through diagnostic steps — it does NOT perform actions.