-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathminimal-cluster.yaml
More file actions
77 lines (68 loc) · 2.55 KB
/
minimal-cluster.yaml
File metadata and controls
77 lines (68 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Minimal Neo4j Enterprise cluster example
# This creates a cluster with minimum 2 servers that self-organize
# Servers can host databases with different primary/secondary topologies
apiVersion: neo4j.neo4j.com/v1alpha1
kind: Neo4jEnterpriseCluster
metadata:
name: minimal-cluster
namespace: default
spec:
# Neo4j Enterprise Edition (required for this operator)
# Neo4j Docker image configuration
image:
repo: neo4j
tag: "5.26.0-enterprise" # Neo4j 5.26+ required
pullPolicy: IfNotPresent
# Minimal cluster topology: 2 servers (minimum required for clustering)
# Servers self-organize and can host databases with different topologies
topology:
servers: 2 # Minimum servers for clustering
# Optional: Constrain all servers to a specific mode (PRIMARY, SECONDARY, or NONE)
# serverModeConstraint: NONE
# Storage configuration
storage:
className: standard # Use your cluster's default storage class
size: "10Gi" # Adjust based on your data needs
# Resource allocation
resources:
requests:
memory: "2Gi" # Initial memory allocation
cpu: "500m" # Initial CPU allocation
limits:
memory: "4Gi" # Maximum memory
cpu: "2" # Maximum CPU cores
# TLS disabled for simplicity (enable for production)
# Note: TLS clusters work reliably with the operator's optimizations
tls:
mode: disabled
# To enable TLS:
# tls:
# mode: cert-manager
# issuerRef:
# name: ca-cluster-issuer
# kind: ClusterIssuer
# Authentication configuration
# IMPORTANT: The operator requires a secret for authentication
# Create the secret before deploying the cluster:
# kubectl create secret generic neo4j-admin-secret \
# --from-literal=username=neo4j \
# --from-literal=password=your-secure-password
auth:
provider: native # Default authentication provider
adminSecret: neo4j-admin-secret
# Additional environment variables (optional)
# NOTE: NEO4J_AUTH and NEO4J_ACCEPT_LICENSE_AGREEMENT are managed by the operator
# and should not be set manually
env: []
---
# Prerequisites:
# 1. Create admin credentials secret BEFORE applying this cluster:
# kubectl create secret generic neo4j-admin-secret \
# --from-literal=username=neo4j \
# --from-literal=password=your-secure-password
#
# 2. Apply the cluster:
# kubectl apply -f minimal-cluster.yaml
#
# NOTE: For single-node deployments without clustering, use Neo4jEnterpriseStandalone instead.
# See examples/standalone/single-node-standalone.yaml for non-clustered deployments.