yugabyte/yugabytedb-skills/yb-k8s-operator

Claude Code and agent skill by yugabyte/yugabytedb-skills

Trust tier 2
  • community
LLM review pending
Source check pending

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-operator

SKILL.md

YugabyteDB Kubernetes Operator

This skill includes:

  • references/crd-examples.md — complete YAML examples for every CRD
  • references/workflows.md — end-to-end provisioning, upgrade, backup, and DR workflows
  • references/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-context points 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:

bash
kubectl apply -f https://raw.github.com/yugabyte/charts/<new-version>/crds/concatenated_crd.yaml
helm upgrade yba yugabytedb/yugaware --version <new-version> ...

CRD Dependency Order

Create resources in this order; each must be Ready before dependents are created.

1. Release — register DB software version
2. YBProvider — define cloud/regions/zones (optional if auto-provider is available)
3. YBCertificate — (optional) TLS certificates
4. YBUniverse — database cluster
5. StorageConfig — backup storage destination
6. Backup / BackupSchedule / RestoreJob — backup operations
7. PitrConfig — point-in-time recovery config
8. PitrRestore — PITR restore operation [v2026.1+]
9. DrConfig — disaster recovery replication
10. SupportBundle — diagnostic log collection

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 found and 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.

FieldTypeRequiredNotes
spec.config.versionstringyese.g. "2025.2.3.0-b149"
spec.config.downloadConfig.http.paths.helmChartstringyes (v2026.1+)URL to Helm chart .tgz — uses 3-part chart version, not full DB version
spec.config.downloadConfig.http.paths.x86_64stringyes (v2026.1+)URL to DB tarball
spec.config.downloadConfig.s3.accessKeyIdstringnoS3 access key
spec.config.downloadConfig.s3.secretAccessKeySecretobjectno{name, namespace} — preferred over inline secret
spec.config.downloadConfig.gcs.credentialsJsonSecretobjectno{name, namespace} — preferred over inline credentials
YBProvider

Defines a Kubernetes cloud provider. Universes reference this by metadata.name.

FieldTypeRequiredImmutableNotes
spec.cloudInfo.kubernetesProviderstring enumnoyesgke, eks, aks, openshift, custom
spec.cloudInfo.kubernetesImageRegistrystringnonoe.g. quay.io/yugabyte/yugabyte
spec.cloudInfo.kubeConfigSecretobjectnono{name, namespace} — global kubeconfig secret
spec.regions[].codestringyesnoRegion code, e.g. us-west1
spec.regions[].zones[].codestringyesnoZone code, e.g. us-west1-a
spec.regions[].zones[].cloudInfo.kubeNamespacestringnonoNamespace for DB pods in this zone
spec.regions[].zones[].cloudInfo.kubernetesStorageClassstringnonoStorageClass — confirm it exists and allows volume expansion
spec.regions[].zones[].cloudInfo.kubeDomainstringnonoCluster domain name [v2026.1+]
spec.regions[].zones[].cloudInfo.kubePodAddressTemplatestringnonoFQDN template for multi-cluster
spec.regions[].zones[].cloudInfo.certManagerIssuerNamestringnonoRequires certManagerIssuerKind
spec.regions[].zones[].cloudInfo.certManagerIssuerGroupstringnonoIssuer group for cert-manager
spec.regions[].zones[].cloudInfo.kubeConfigSecretobjectnonoPer-zone kubeconfig override
spec.regions[].zones[].cloudInfo.overridesobjectnonoFree-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
FieldTypeRequiredNotes
spec.certTypestring enumyesSELF_SIGNED or K8S_CERT_MANAGER
spec.certificateSecretRef.namestringyesSecret name (SELF_SIGNED needs ca.crt + ca.key; K8S_CERT_MANAGER needs ca.crt only)
spec.certificateSecretRef.namespacestringnoDefaults to CR namespace
YBUniverse

The primary CRD. Creates and manages a YugabyteDB database cluster.

Core fields:

FieldTypeRequiredImmutableDefaultNotes
spec.universeNamestringnoyes—Display name in YBA UI
spec.numNodesintegeryesno—Total tserver count; must be ≥ replicationFactor
spec.replicationFactorintegeryesyes—Typically 3
spec.ybSoftwareVersionstringyesno—Must match a registered Release
spec.providerNamestringnoyes—YBProvider CR name
spec.zoneFilterstring arraynoyes—Filter zones used by auto-provider (only when providerName unset) [v2026.1+]
spec.enableYSQLboolnoyestrueYSQL (PostgreSQL-compatible)
spec.enableYCQLboolnoyesfalseYCQL (Cassandra-compatible)
spec.enableYSQLAuthboolnoyesfalseRequires ysqlPassword.secretName
spec.enableYCQLAuthboolnoyesfalseRequires ycqlPassword.secretName
spec.enableNodeToNodeEncryptboolnoyestrueTLS between nodes
spec.enableClientToNodeEncryptboolnoyestrueTLS for client connections
spec.rootCAstringnoyes—YBCertificate CR name
spec.enableLoadBalancerboolnoyesfalseCreates Type:LoadBalancer services
spec.enableIPV6boolnoyesfalse—
spec.pausedboolnonofalseScales pods to 0
spec.useYbdbInbuiltYbcboolnonofalseYBC 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+):

FieldTypeNotes
spec.placementInfo.defaultRegionstringImmutable once set. Location of masters; omit to spread masters across all regions.
spec.placementInfo.regions[].codestringRegion code from provider
spec.placementInfo.regions[].zones[].codestringZone code from provider
spec.placementInfo.regions[].zones[].numNodesintegerNodes in this zone
spec.placementInfo.regions[].zones[].preferredboolDefault 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.

FieldTypeDefaultNotes
spec.tserverVolume.volumeSizeinteger100GiB per volume
spec.tserverVolume.numVolumesinteger2Mutable with DB ≥ 2026.1.0
spec.tserverVolume.storageClassstring—Mutable with DB ≥ 2026.1.0
spec.tserverVolume.perAZmap[string]object—Per-AZ overrides: volumeSize, numVolumes, storageClass
spec.masterVolume.volumeSizeinteger50GiB per volume
spec.masterVolume.numVolumesinteger1Mutable with DB ≥ 2026.1.0
spec.masterVolume.storageClassstring—Mutable with DB ≥ 2026.1.0
spec.masterVolume.perAZmap[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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/yugabyte/yugabytedb-skills/yb-k8s-operator/badge)](https://verified-skill.com/skills/yugabyte/yugabytedb-skills/yb-k8s-operator)

Something wrong with this skill or its page? Tell us.