Standalone and Cluster Mode
Run Swytch behind a Kubernetes Service when your application cannot use a sidecar or several clients need a shared endpoint.
Install the operator and create a swytch-secret credential in your application namespace. Apply
this resource in that namespace:
apiVersion: swytch.getswytch.com/v1alpha1
kind: Swytch
metadata:
name: shared-cache
spec:
deployment: server
memory: 1Gi
server:
replicas: 2
discovery:
dns:
secretKeyRef:
name: swytch-secret
key: cluster-passphrase
The operator creates a Deployment and ClusterIP Service. Connect to swytch-shared-cache:6379 from the same namespace,
or swytch-shared-cache.NAMESPACE.svc:6379 from another.
The Redis Service uses plain TCP. Restrict client access with your cluster network policy; peer mTLS does not authenticate Redis clients.
Set server.replicas to the required count. Changes reconcile the managed Deployment. Deployment mode is immutable;
create a new profile to switch between server and sidecar mode.
More replicas do not create fully populated backups. Nodes receive keys through client use, so a server cluster is not automatically a backing storage tier for sidecars. Use tiering when state must survive the loss of all holders.
For servers outside Kubernetes, see standalone deployment.