spec:
size: 3This will use the default version chosen by the etcd-operator.
spec:
size: 3
version: "3.2.13"Note: change $cluster_name to the EtcdCluster's name.
spec:
size: 3
pod:
nodeSelector:
diskType: ssd
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: etcd_cluster
operator: In
values: ["$cluster_name"]
topologyKey: kubernetes.io/hostnameFor other topology keys, see https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ .
Three member cluster with preferred anti-affinity between pods and nodes (place pods in different nodes if possible)
Note: change $cluster_name to the EtcdCluster's name.
spec:
size: 3
pod:
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: etcd_cluster
operator: In
values:
- $cluster_name
topologyKey: kubernetes.io/hostnamespec:
size: 3
pod:
resources:
limits:
cpu: 300m
memory: 200Mi
requests:
cpu: 200m
memory: 100Mietcd members could be configured via env: https://coreos.com/etcd/docs/latest/op-guide/configuration.html
spec:
size: 3
pod:
etcdEnv:
- name: ETCD_AUTO_COMPACTION_RETENTION
value: "1"For more information on working with TLS, see Cluster TLS policy.
spec:
size: 3
pod:
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "2379"For more information on pod security context see the Kubernetes docs.
spec:
size: 3
pod:
securityContext:
runAsNonRoot: true
runAsUser: 9000
# The FSGroup is needed to let the etcd container access mounted volumes
fsGroup: 9000Note: Change $STORAGECLASS for your preferred StorageClass or remove the line to use the default one.
spec:
size: 3
pod:
persistentVolumeClaimSpec:
storageClassName: $STORAGECLASS
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi