yugabyte/yugabytedb-skills/yb-k8s-operator
Claude Code and agent skill by yugabyte/yugabytedb-skills
- community
Checking that the SKILL.md file is still in the repository.
Use when provisioning, managing, or troubleshooting YugabyteDB universes on Kubernetes via the YugabyteDB Kubernetes Operator and YugabyteDB Anywhere CRDs (YBUniverse, YBProvider, Release, Backup, StorageConfig, PitrRestore, DrConfig, etc.). Triggers on kubectl apply, Helm install of yugaware, operator CRDs, or any mention of YugabyteDB with Kubernetes.
Install
npx vskill@latest install yugabyte/yugabytedb-skills/yb-k8s-operatorSKILL.md
YugabyteDB Kubernetes Operator
This skill includes:
references/crd-examples.md— complete YAML examples for every CRDreferences/workflows.md— end-to-end provisioning, upgrade, backup, and DR workflowsreferences/kubeconfig-secrets.md— create and rotate kubeconfig secrets for multi-cluster providers. Always follow this guidance; do not create generic kubeconfig secrets.references/multi-cluster.md— Helm overrides and pod address templates for Istio and Cilium
Note: This skill covers the YBA Kubernetes Operator (commercial). It does not fully apply to the YugabyteDB OSS Kubernetes Operator, which has fewer CRDs and features.
The operator manages YBA universes declaratively via Kubernetes CRs alongside YBA, watching a configured namespace for changes.
CRD source: https://raw.github.com/yugabyte/charts/<version>/crds/concatenated_crd.yaml Documentation: https://docs.yugabyte.com/stable/yugabyte-platform/anywhere-automation/yb-kubernetes-operator/
Prerequisites
Before creating any CRs:
- [ ]
kubectl config current-contextpoints to the cluster running the operator. - [ ] You are targeting the namespace from
yugaware.kubernetesOperatorNamespace(empty string = all namespaces). - [ ] CRDs applied at the same version as the Helm chart (
helm ls -A | grep yugaware). - [ ] If RBAC is namespace-scoped (RoleBinding only, no ClusterRoleBinding), a YBProvider CR must be created explicitly — the operator cannot auto-discover node/zone topology.
- [ ] For multi-cluster universes, kubeconfig secrets exist for each remote cluster.
Auto-created vs explicit YBProvider: The operator auto-creates a provider only when the universe targets the same cluster as the operator AND YBA has a ClusterRoleBinding. Create a YBProvider CR explicitly when targeting a different cluster, when RBAC is namespace-scoped, or when you need per-zone control (storage class, namespace, overrides, kubeconfig, cert-manager).
CRD upgrades: Apply CRDs before helm upgrade — mismatched CRDs cause silent field drops or validation errors:
CRD Dependency Order
Create resources in this order; each must be Ready before dependents are created.
CRD Quick Reference
All CRDs use apiVersion: operator.yugabyte.io/v1alpha1.
Release
Registers a YugabyteDB software version. Must reach status.success: true before a universe can reference it.
The CRD validation (v2026.1+) requires exactly one helmChart path and exactly one x86_64 path across the combination of http, s3, and gcs — they can come from different sources (e.g. http for the Helm chart and s3 for the tarball). In pre-2026.1 CRDs, x86_64 was optional.
Helm chart URL format: The chart filename uses the 3-part chart version, not the full DB version string — https://charts.yugabyte.com/yugabyte-<major>.<minor>.<patch>.tgz. For example, DB version 2025.2.3.0-b149 uses chart version 2025.2.3, so helmChart: "https://charts.yugabyte.com/yugabyte-2025.2.3.tgz". Confirm chart existence with helm search repo yugabytedb/yugabyte --versions before authoring the CR.
`kubernetesOperatorNamespace: ""` bug: When the operator watches all namespaces (empty string), ReleaseReconciler.onAdd throws namespace not specified when patching the CR status. The exception fires between YBA registration and the download trigger, so:
- The release appears in YBA metadata but packages are never downloaded — the release shows as incomplete in YBA and cannot be used to upgrade a universe.
- Subsequent reconcile loops log
no changes foundand do not retry the download. - Releases that fail YBA registration (bad URL, non-existent version) are re-processed via the update path, which does write status correctly.
Workaround: Set kubernetesOperatorNamespace to the specific namespace where universes run instead of "". With a namespace set, the onAdd status patch succeeds and the download is triggered normally.
| Field | Type | Required | Notes | |
|---|---|---|---|---|
spec.config.version | string | yes | e.g. "2025.2.3.0-b149" | |
spec.config.downloadConfig.http.paths.helmChart | string | yes (v2026.1+) | URL to Helm chart .tgz — uses 3-part chart version, not full DB version | |
spec.config.downloadConfig.http.paths.x86_64 | string | yes (v2026.1+) | URL to DB tarball | |
spec.config.downloadConfig.s3.accessKeyId | string | no | S3 access key | |
spec.config.downloadConfig.s3.secretAccessKeySecret | object | no | {name, namespace} — preferred over inline secret | |
spec.config.downloadConfig.gcs.credentialsJsonSecret | object | no | {name, namespace} — preferred over inline credentials |
YBProvider
Defines a Kubernetes cloud provider. Universes reference this by metadata.name.
| Field | Type | Required | Immutable | Notes | |
|---|---|---|---|---|---|
spec.cloudInfo.kubernetesProvider | string enum | no | yes | gke, eks, aks, openshift, custom | |
spec.cloudInfo.kubernetesImageRegistry | string | no | no | e.g. quay.io/yugabyte/yugabyte | |
spec.cloudInfo.kubeConfigSecret | object | no | no | {name, namespace} — global kubeconfig secret | |
spec.regions[].code | string | yes | no | Region code, e.g. us-west1 | |
spec.regions[].zones[].code | string | yes | no | Zone code, e.g. us-west1-a | |
spec.regions[].zones[].cloudInfo.kubeNamespace | string | no | no | Namespace for DB pods in this zone | |
spec.regions[].zones[].cloudInfo.kubernetesStorageClass | string | no | no | StorageClass — confirm it exists and allows volume expansion | |
spec.regions[].zones[].cloudInfo.kubeDomain | string | no | no | Cluster domain name [v2026.1+] | |
spec.regions[].zones[].cloudInfo.kubePodAddressTemplate | string | no | no | FQDN template for multi-cluster | |
spec.regions[].zones[].cloudInfo.certManagerIssuerName | string | no | no | Requires certManagerIssuerKind | |
spec.regions[].zones[].cloudInfo.certManagerIssuerGroup | string | no | no | Issuer group for cert-manager | |
spec.regions[].zones[].cloudInfo.kubeConfigSecret | object | no | no | Per-zone kubeconfig override | |
spec.regions[].zones[].cloudInfo.overrides | object | no | no | Free-form Helm overrides per zone |
Status: status.state, status.message.
Kubeconfig secrets must contain a single key kubeconfig with complete kubeconfig YAML. Use long-lived service account tokens — YBA does not support short-lived token plugins. See references/kubeconfig-secrets.md for the full procedure.
For multi-cluster service mesh (Istio / Cilium), see references/multi-cluster.md.
YBCertificate
| Field | Type | Required | Notes | |
|---|---|---|---|---|
spec.certType | string enum | yes | SELF_SIGNED or K8S_CERT_MANAGER | |
spec.certificateSecretRef.name | string | yes | Secret name (SELF_SIGNED needs ca.crt + ca.key; K8S_CERT_MANAGER needs ca.crt only) | |
spec.certificateSecretRef.namespace | string | no | Defaults to CR namespace |
YBUniverse
The primary CRD. Creates and manages a YugabyteDB database cluster.
Core fields:
| Field | Type | Required | Immutable | Default | Notes | |
|---|---|---|---|---|---|---|
spec.universeName | string | no | yes | — | Display name in YBA UI | |
spec.numNodes | integer | yes | no | — | Total tserver count; must be ≥ replicationFactor | |
spec.replicationFactor | integer | yes | yes | — | Typically 3 | |
spec.ybSoftwareVersion | string | yes | no | — | Must match a registered Release | |
spec.providerName | string | no | yes | — | YBProvider CR name | |
spec.zoneFilter | string array | no | yes | — | Filter zones used by auto-provider (only when providerName unset) [v2026.1+] | |
spec.enableYSQL | bool | no | yes | true | YSQL (PostgreSQL-compatible) | |
spec.enableYCQL | bool | no | yes | false | YCQL (Cassandra-compatible) | |
spec.enableYSQLAuth | bool | no | yes | false | Requires ysqlPassword.secretName | |
spec.enableYCQLAuth | bool | no | yes | false | Requires ycqlPassword.secretName | |
spec.enableNodeToNodeEncrypt | bool | no | yes | true | TLS between nodes | |
spec.enableClientToNodeEncrypt | bool | no | yes | true | TLS for client connections | |
spec.rootCA | string | no | yes | — | YBCertificate CR name | |
spec.enableLoadBalancer | bool | no | yes | false | Creates Type:LoadBalancer services | |
spec.enableIPV6 | bool | no | yes | false | — | |
spec.paused | bool | no | no | false | Scales pods to 0 | |
spec.useYbdbInbuiltYbc | bool | no | no | false | YBC runs from the DB container image rather than installed at runtime [v2026.1+] |
Password secrets: create a Kubernetes Secret with key ysqlPassword or ycqlPassword (≥12 chars, mixed case, numbers, special chars) in the same namespace as the YBUniverse, then reference via spec.ysqlPassword.secretName / spec.ycqlPassword.secretName. Both fields are immutable once set.
Placement (v2025.2+):
| Field | Type | Notes | |
|---|---|---|---|
spec.placementInfo.defaultRegion | string | Immutable once set. Location of masters; omit to spread masters across all regions. | |
spec.placementInfo.regions[].code | string | Region code from provider | |
spec.placementInfo.regions[].zones[].code | string | Zone code from provider | |
spec.placementInfo.regions[].zones[].numNodes | integer | Nodes in this zone | |
spec.placementInfo.regions[].zones[].preferred | bool | Default true |
Storage — v2026.1+: `tserverVolume` / `masterVolume` (preferred):
Replaces deviceInfo/masterDeviceInfo; the two sets are mutually exclusive. numVolumes and storageClass are mutable when running DB ≥ 2026.1.0. Provider-level storage class takes precedence over storageClass here — leave the provider value empty to use this field. Once set, tserverVolume/masterVolume cannot be removed; perAZ within them cannot be removed once set.
| Field | Type | Default | Notes | |
|---|---|---|---|---|
spec.tserverVolume.volumeSize | integer | 100 | GiB per volume | |
spec.tserverVolume.numVolumes | integer | 2 | Mutable with DB ≥ 2026.1.0 | |
spec.tserverVolume.storageClass | string | — | Mutable with DB ≥ 2026.1.0 | |
spec.tserverVolume.perAZ | map[string]object | — | Per-AZ overrides: volumeSize, numVolumes, storageClass | |
spec.masterVolume.volumeSize | integer | 50 | GiB per volume | |
spec.masterVolume.numVolumes | integer | 1 | Mutable with DB ≥ 2026.1.0 | |
spec.masterVolume.storageClass | string | — | Mutable with DB ≥ 2026.1.0 | |
spec.masterVolume.perAZ | map[string]object | — | Per-AZ overrides |
Storage — legacy: `deviceInfo` / `masterDeviceInfo` (deprecated v2026.1+):
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/yb-k8s-operator/SKILL.md
Popularity
- Repository stars
- 8
- Repository forks
- 7
- 7-day trend score
- 16
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/yugabyte/yugabytedb-skills/yb-k8s-operator)