Installing SpiceDB on Kubernetes
This document outlines how to install SpiceDB for systems running Kubernetes.
SpiceDB is designed to run on Kubernetes and is our recommendation for production deployments.
Did You Know? The team behind SpiceDB helped pioneer the container and Kubernetes ecosystem.
SpiceDB was born out of frustration by folks from CoreOS (opens in a new tab) and OpenShift (opens in a new tab).
Installing SpiceDB using the SpiceDB Operator
The SpiceDB Operator is the best way to deploy SpiceDB in production.
To install the latest version of the SpiceDB Operator you can run the following command:
kubectl apply --server-side -f https://github.com/authzed/spicedb-operator/releases/latest/download/bundle.yaml
After installation, you can create an example deployment of SpiceDB by applying a SpiceDBCluster Custom Resource:
kubectl apply --server-side -f - <<EOF
apiVersion: authzed.com/v1alpha1
kind: SpiceDBCluster
metadata:
name: dev
spec:
config:
datastoreEngine: memory
secretName: dev-spicedb-config
---
apiVersion: v1
kind: Secret
metadata:
name: dev-spicedb-config
stringData:
preshared_key: "averysecretpresharedkey"
EOF
To learn more about the SpiceDB Operator, you can read its documentation.
Installing SpiceDB using kubectl
If you prefer writing your own Kubernetes manifests from scratch and are looking for a starting place with SpiceDB, you can install an example deployment using the following command:
kubectl apply --server-side -f https://raw.githubusercontent.com/authzed/examples/main/kubernetes/example.yaml
You should read through these example manifests (opens in a new tab) as it contains comments for quickly configuring certain features.
If you're looking for something production-ready, install the SpiceDB Operator.
Installing SpiceDB using Helm
Warning: There is no officially supported Helm Chart for SpiceDB; use this at your own risk.
There is a community maintained Chart (opens in a new tab) by the folks over at Bushel (opens in a new tab). As per their instructions, you can install it like this:
helm repo add spicedb-operator-chart https://bushelpowered.github.io/spicedb-operator-chart/
helm repo update
helm repo upgrade --install ... $RELEASE spicedb-operator-chart/spicedb-operator