Skip to main content

Graph Studio Deployment with Data Persistence

Overview & Use Case​

This configuration is used to deploy Graph Studio with persistent storage using Kubernetes Persistent Volume Claims (PVCs). It is intended for production or stateful deployments where Graph Studio server data, logs, activation state, and working caches must persist across pod restarts, upgrades, or node reschedules.

Key Highlights​

  • Persistent Volume Claims: Provisions a volume claim (persistence-volume) with 10Gi storage and Retain reclaim policy.
  • Volume Mounts: Mounts subpaths for activation state (/k8s-startup-data/activation), server data (/opt/anzo/Server/data), and logs (/opt/anzo/Server/logs).
  • Init Container: Uses an anzo-init container to prepare directory subpaths prior to Graph Studio startup.
  • Working Cache: Configures an emptyDir volume for temporary working cache (/opt/anzo/Server/data/anzowtcache).

Custom Resource Definition​

apiVersion: anzo.cambridgesemantics.com/v2
kind: Anzo
metadata:
name: server
namespace: "${NAMESPACE}"
spec:
jsonActivation: true
jvmMemory: 4096m
initJSON: |-
{
"sysadminUser": "k8s://anzo-server/admin_user",
"password": "k8s://anzo-server/admin_password",
"hostname": "server",
"serverId": "${SERVER_ID}",
"licenseEncoded": "${CSI_LICENSE}"
}
nodeConfig:
spec:
persistentVolumeClaimRetentionPolicy:
whenDeleted: Retain
replicas: 1
selector:
matchLabels:
app: anzo
serviceName: anzo-server
template:
metadata:
annotations:
cluster-autoscaler.kubernetes.io/safe-to-evict: "false"
labels:
app: anzo
spec:
containers:
- image: artifacts.altair.com/graph-docker/anzo:6.3.1
name: anzo
volumeMounts:
- mountPath: /k8s-startup-data/activation
name: persistence-volume
subPath: activation
- mountPath: /opt/anzo/Server/data
name: persistence-volume
subPath: data
- mountPath: /opt/anzo/Server/logs
name: persistence-volume
subPath: logs
- mountPath: /opt/anzo/Server/data/anzowtcache
name: anzowtcache-volume
initContainers:
- name: anzo-init
volumeMounts:
- mountPath: /opt/anzo/Server/data
name: persistence-volume
subPath: data
- mountPath: /opt/anzo/Server/data/anzowtcache
name: anzowtcache-volume
- mountPath: /k8s-startup-data/activation
name: persistence-volume
subPath: activation
securityContext:
fsGroup: 1001
serviceAccountName: anzo-operator
volumes:
- emptyDir: {}
name: anzowtcache-volume
volumeClaimTemplates:
- metadata:
name: persistence-volume
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
role: AnzoServer