Home > Storage > PowerFlex > White Papers > CockroachDB Deployment on Dell PowerFlex with Kubernetes > CockroachDB YAML deployment file
The following is a sample CockroachDB YAML deployment file:
apiVersion: crdb.cockroachlabs.com/v1alpha1
kind: CrdbCluster
metadata:
# this translates to the name of the statefulset that is created
name: cockroachdb
spec:
dataStore:
pvc:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: "220Gi"
storageClassName: vxflexos-xfs
volumeMode: Filesystem
resources:
requests:
# This is intentionally low to make it work on local k3d clusters.
cpu: 16
memory: 16Gi
limits:
cpu: 16
memory: 16Gi
cache: "4Gi"
maxSQLMemory: "4Gi"
tlsEnabled: true
# You can set either a version of the db or a specific image name
cockroachDBVersion: v23.1.11
#image:
# name: cockroachdb/cockroach:v23.1.11
# nodes refers to the number of crdb pods that are created
# via the statefulset
nodes: 40
additionalLabels:
crdb: is-cool
# affinity is a new API field that is behind a feature gate that is
# disabled by default. To enable please see the operator.yaml file.
# The affinity field will accept any podSpec affinity rule.
# affinity:
# podAntiAffinity:
# preferredDuringSchedulingIgnoredDuringExecution:
# - weight: 100
# podAffinityTerm:
# labelSelector:
# matchExpressions:
# - key: app.kubernetes.io/instance
# operator: In
# values:
# - cockroachdb
# topologyKey: kubernetes.io/hostname
# nodeSelectors used to match against
# nodeSelector:
# worker-pool-name: crdb-workers