mTLS Cluster Security

Automatic mTLS for secure inter-node communication in distributed Spice.ai clusters.

Spice.ai Enterprise secures inter-node communication in distributed query clusters using mutual TLS (mTLS). When using the SpicepodCluster CRD, certificates are provisioned and managed automatically.

Port Separation

PortVisibilityServicesmTLS Required
50051PublicArrow Flight, OpenTelemetryOptional
8090PublicHTTP APIOptional
9090PublicPrometheus metricsNo
50052InternalScheduler gRPC, Cluster ServiceRequired

Public-facing ports (50051, 8090) serve client traffic and can optionally use TLS. The internal port (50052) carries cluster coordination traffic and requires mTLS in production.

Automatic Certificate Management (Kubernetes)

When deployed via SpicepodCluster, the operator handles the full certificate lifecycle:

  1. Root CA — Auto-generated self-signed CA stored in a Kubernetes Secret.
  2. Leaf certificates — Per-node certificates with appropriate Subject Alternative Names (SANs).
  3. Expiry tracking — Certificate expiry is surfaced via Prometheus metrics.

No manual PKI setup is required.

Manual Certificate Management (CLI)

For non-Kubernetes deployments, use the Spice CLI to manage a PKI:

Initialize a PKI

spice cluster tls init

Generate Node Certificates

spice cluster tls add scheduler1
spice cluster tls add executor1 --host executor1.cluster.local

Start Nodes with mTLS

spiced --role scheduler \
  --node-mtls-ca-certificate-file ca.pem \
  --node-mtls-certificate-file scheduler1.pem \
  --node-mtls-key-file scheduler1-key.pem \
  --node-advertise-address scheduler1.cluster.local

spiced --role executor \
  --node-mtls-ca-certificate-file ca.pem \
  --node-mtls-certificate-file executor1.pem \
  --node-mtls-key-file executor1-key.pem \
  --scheduler-address https://scheduler1.cluster.local:50052 \
  --node-advertise-address executor1.cluster.local

CLI Reference

FlagDescription
--roleNode role: scheduler or executor
--node-mtls-ca-certificate-filePath to the CA certificate
--node-mtls-certificate-filePath to the node certificate
--node-mtls-key-filePath to the node private key
--node-advertise-addressHostname for inter-node communication
--node-bind-addressBind address for the internal port
--scheduler-addressScheduler URL (executor only)
--allow-insecure-connectionsDisable mTLS (dev/test only)

Internal Cluster Services (Port 50052)

The internal gRPC services secured by mTLS. See Distributed Query → Internal gRPC for the full surface.

RPCDescription
GetAppDefinitionExecutors fetch the full Spicepod definition (datasets, catalogs, views, UDFs) from the scheduler.
ExpandSecretExecutors request secret values from the scheduler's secret store.
GetSchedulersExecutors fetch the live scheduler membership list to open a poll loop to every scheduler.
AllocateInitialPartitionsExecutors fetch their assigned partition filter expressions per accelerated table.
ControlStream (bidirectional)Carries executor heartbeats and metrics; receives partition update, refresh, and cancel commands.
GetTaskHistoryFederated runtime.task_history fan-out across peer schedulers.
GetMetricsOn-demand OTLP metrics collection across the cluster.