For the complete documentation index, see llms.txt. This page is also available as Markdown.

User Guide

Step-by-step guide to deploying and operating Spice.ai workloads with the Kubernetes Operator.

This guide walks through deploying and operating Spice.ai on Kubernetes with the operator — from installing the controller to configuring storage, networking, rollouts, scaling, and observability. For exhaustive field references, see SpicepodSet and SpicepodCluster.

All manifests below use the current spice.ai/v2 API version. Existing spice.ai/v1 / spice.ai/v1alpha1 manifests continue to apply and are converted automatically — see Migrating from spice.ai/v1.

Prerequisites

  • Kubernetes 1.33+

  • Helm 3.x

  • kubectl configured for your cluster

  • Access to a Spice runtime image (the enterprise image is pulled from the AWS Marketplace ECR registry; a pull secret is required)

1. Install the operator

The operator is distributed as an OCI Helm chart. Subscribe to the AWS Marketplace listing, authenticate to the Marketplace ECR registry, then install into its own namespace:

helm install spiceai-operator \
  oci://709825985650.dkr.ecr.us-east-1.amazonaws.com/spice-ai/charts/spiceai-operator \
  --namespace spiceai-operator-system --create-namespace

The chart installs the SpicepodSet and SpicepodCluster CRDs by default (crds.enabled: true). Verify the controller is running:

kubectl -n spiceai-operator-system get pods
kubectl get crds | grep spice.ai

See the Overview for the full list of Helm values.

2. Deploy your first Spicepod

A SpicepodSet is the simplest way to run a Spicepod. Create spicepodset.yaml:

Apply it and watch it come up:

Each SpicepodSet is deployed as one or more StatefulSets — one per replica, each with an ordinal suffix — so every pod has a stable identity and predictable DNS name, even with a single replica. The spicepod object is stored in a ConfigMap and mounted into each pod; editing it triggers a rollout.

Port-forward and query the runtime:

3. Configure the workload

The sections below cover the most common configuration tasks. Each maps to a field on spec; see the SpicepodSet reference for every option.

Set the container image

repository is the full registry + name path. To use a public build instead, set repository: spiceai/spiceai (Docker Hub) or repository: ghcr.io/spiceai/spiceai.

Use a private registry

Provide credentials with a pull secret:

Configure ports

These set what the Spiced container listens on. The managed Service always exposes fixed ports 8080 (HTTP), 50051 (Flight), and 9090 (metrics), mapping targetPort to the configured Spiced ports above.

Request CPU and memory

Inject environment variables and secrets

The Spicepod YAML supports ${secrets:KEY} references to Kubernetes Secret values. Inject the backing Secret with envFromSource so the value resolves inside the pod at runtime.

Add persistent storage

Attach per-replica volumes with the volumeClaimTemplates list; the operator creates a PersistentVolumeClaim per entry, per StatefulSet. The entry named data (the default when metadata.name is omitted) is auto-mounted at /data:

Increasing the storage request triggers automatic PVC resizing when the StorageClass has allowVolumeExpansion: true. Shrinking is not supported.

Use a service account (IRSA)

Set create: false and name: to reuse an existing ServiceAccount.

Restrict network traffic

A NetworkPolicy is opt-in — the operator only creates one when you supply network.ingress and/or network.egress, and writes those rules verbatim. No implicit DNS, operator-namespace, or cluster-peer rules are added, so include a DNS egress rule yourself:

The admission webhook warns when egress omits a DNS rule. See Network and DNS for the full schema.

Choose an update strategy

  • RollingOrdered (default) — one pod at a time, waiting for Ready.

  • RollingParallel — parallel updates bounded by maxUnavailable.

  • BlueGreen — brings up a full parallel generation, then atomically switches the Service.

The legacy Parallel strategy has been removed; resources specifying it are converted to RollingOrdered.

Enable standby versions and instant rollback

Retain the previous generation after a rollout so traffic can be cut back instantly:

To roll back, re-apply the previous spec (helm rollback, kubectl apply of an earlier manifest, or a Git revert). Because the trigger is a content-based SHA of the spec, rollback is GitOps-compatible with ArgoCD and Flux — no operator-owned annotation to round-trip. See Standby Versions & Instant Rollback.

Scale and pause

Change replicas to scale. Set replicas: 0 to pause the workload while retaining the Service, ConfigMap, ServiceAccount, and any user-supplied NetworkPolicy:

Force a rollout

annotations and labels propagate to every managed resource. Changing either triggers a full rollout — a convenient restart mechanism:

Operator-reserved spice.ai/* keys are rejected by the admission controller on spec.labels / spec.annotations.

Tune health probes and scheduling

4. Deploy a distributed cluster

For query workloads that benefit from dedicated scheduler and executor nodes, use a SpicepodCluster. The operator provisions mTLS certificates and manages child SpicepodSets automatically:

Executors pull their Spicepod configuration from the scheduler, so executorSpec needs no spicepod field. See the SpicepodCluster reference for mTLS, port separation, and per-node overrides.

5. Inject a sidecar into an existing Pod

To add a Spice sidecar to any existing Pod, annotate its template and point at a ConfigMap holding spicepod.yaml:

The ConfigMap must exist before the Pod is created. See Sidecar Injection for all supported annotations.

6. Monitor and inspect status

kubectl works natively thanks to standard status conditions:

The status API returns per-pod details (phase, IP, Spiced health/readiness, error reasons). Paused SpicepodSets report paused: true with a pauseReason. For operator self-telemetry over Prometheus and OTLP, see Operator Metrics.

7. Crashloop protection

The operator monitors pods for repeated failures and, when the configured threshold is exceeded, pauses the workload (replicas → 0), sets status.pauseReason = CrashLooping, and emits a Warning event. Configure the threshold with the Helm value pauseCrashloopingPodsThreshold (the chart ships 0, disabled, by default). To recover, fix the configuration and set replicas back to the desired count.

8. Upgrade the operator

v2 is served with automatic conversion of legacy resources, so existing SpicepodSet / SpicepodCluster manifests continue to apply after the upgrade.

Next steps

Last updated

Was this helpful?