Deploying SPIKE (Kubernetes and bare-metal)
Problem
SPIKE is not a single binary you start. It is a small constellation of components on top of SPIRE: Nexus (the secret store), one or more Keepers (root- key shard holders), Pilot (the CLI), and a one-shot Bootstrap step. Standing them up in the wrong order, or skipping bootstrap, leaves Nexus stuck in keeper recovery and never Ready. This recipe is the map of what you deploy and in what order; the linked guides have the full command-by-command walkthrough.
TL;DR
The order is always: SPIRE -> Keepers + Nexus -> Bootstrap -> ready.
1. SPIRE server + agent (identity substrate)
2. SPIKE Keepers and Nexus (Nexus waits in keeper recovery)
3. SPIKE Bootstrap (seeds the keepers with root-key shards) <-- the easy miss
4. Nexus reconstructs the root key and becomes Ready
On Kubernetes that is the SPIFFE Helm chart plus a bootstrap Job; on bare-metal
it is the SPIRE binaries plus the SPIKE make targets. See
Quickstart (Kubernetes) and
SPIKE on Linux (bare-metal) for the exact commands.
Workflow
Kubernetes
- Install SPIRE via the hardened SPIFFE Helm chart. This gives every
component (including
spike/bootstrap) a SPIFFE identity. - Deploy the SPIKE components (Keepers, Nexus). Install without
--wait: Nexus cannot become Ready until the keepers are seeded, so a--waitinstall hangs. - Run the Bootstrap Job with the
spike/bootstrapSVID. It generates the root key, splits it into Shamir shares, and seeds the keepers. Give its ServiceAccount RBAC for thespike-bootstrap-stateConfigMap so re-runs are idempotent. - Wait on the Nexus rollout. Once the keepers hold
thresholdshares, Nexus reconstructs the root key, initializes its backend, and goes Ready.
Bare-metal
- Run SPIRE server and agent, and register the SPIKE component identities
(the
hack/bare-metal/entryscripts do this). - Start the Keepers and Nexus from the SPIKE binaries /
maketargets. - Bootstrap with
make bootstrapto generate and distribute the root-key shares. - Use Pilot.
spiketalks to Nexus over mTLS once Nexus is Ready.
Tips
- Pick the backend deliberately.
memoryfor a throwaway dev box (no keepers, no bootstrap),sqlitefor persistent production,litefor encryption-only. The mode changes whether you even need bootstrap. See Choosing a backend store. - Shares and threshold are deployment-wide. Decide
SHARESandTHRESHOLDbefore bootstrap; they determine how many keepers you run and how many can fail. Production guidance is 5 shares / threshold 3. - Use fully-qualified DNS in Kubernetes. Point
SPIKE_NEXUS_API_URLat the*.svc.cluster.localname; the shortservice.namespaceform is NXDOMAIN in some setups. - Set all the trust roots. Nexus checks identities against the configured
trust roots (including
SPIKE_TRUST_ROOT_NEXUS); a missing one silently rejects callers.
Pitfalls
- Bootstrap is not optional for
lite/sqlite. Both need keepers and a root key. Forgetting bootstrap is the number-one reason a fresh deployment never reaches Ready. See Bootstrapping a fresh SPIKE. helm install --waitdeadlocks. Nexus is not Ready until the keepers are seeded, which happens after install. Install without--wait, bootstrap, then wait on the Nexus rollout.- Image cache traps (local clusters). With
imagePullPolicy: Never, kind and minikube reuse a cached image for the same tag even after a fresh load. Use a unique tag (or force a re-pull) when iterating on images. - Order is not negotiable. Keepers and Nexus before bootstrap; bootstrap before expecting Ready. Out of order, you chase phantom failures.
Cross-links
- Choosing a backend store
- Bootstrapping a fresh SPIKE
- Production hardening
- Troubleshooting
- Reference: Quickstart, SPIKE on Linux, Configuration
What’s next
Lock the deployment down before it carries real secrets: Production hardening.