-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathingress-cluster.yaml
More file actions
117 lines (99 loc) · 3.15 KB
/
ingress-cluster.yaml
File metadata and controls
117 lines (99 loc) · 3.15 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# Ingress Example for Neo4j Enterprise Cluster
# This example shows how to expose Neo4j Browser via Ingress
# Uses server-based architecture with 5 servers that self-organize
# Requires an Ingress controller (e.g., nginx-ingress) and cert-manager for TLS
apiVersion: v1
kind: Secret
metadata:
name: neo4j-admin-secret
type: Opaque
stringData:
username: neo4j
password: changeme123! # CHANGE THIS IN PRODUCTION
---
apiVersion: neo4j.neo4j.com/v1alpha1
kind: Neo4jEnterpriseCluster
metadata:
name: ingress-cluster
spec:
image:
repo: neo4j
tag: "5.26.0-enterprise"
pullPolicy: IfNotPresent
topology:
servers: 5 # Five servers for flexible database topologies
storage:
className: standard
size: "20Gi"
resources:
requests:
memory: "2Gi"
cpu: "1"
limits:
memory: "4Gi"
cpu: "2"
# TLS configuration for secure connections
tls:
mode: cert-manager
issuerRef:
name: letsencrypt-prod # or your ClusterIssuer
kind: ClusterIssuer
# Service and Ingress configuration
service:
# Keep default ClusterIP for internal access
type: ClusterIP
# Ingress configuration for HTTPS access
ingress:
enabled: true
className: nginx # Your ingress controller class
host: neo4j.example.com # CHANGE THIS to your domain
# Enable TLS on the Ingress
tlsEnabled: true
tlsSecretName: neo4j-tls-ingress
# Ingress annotations
annotations:
# Cert-manager annotation for automatic certificate provisioning
cert-manager.io/cluster-issuer: letsencrypt-prod
# NGINX specific annotations
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
nginx.ingress.kubernetes.io/proxy-body-size: "0"
nginx.ingress.kubernetes.io/proxy-read-timeout: "600"
nginx.ingress.kubernetes.io/proxy-send-timeout: "600"
# Enable websocket support for Neo4j Browser
nginx.ingress.kubernetes.io/proxy-http-version: "1.1"
nginx.ingress.kubernetes.io/configuration-snippet: |
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# Authentication
auth:
provider: native
adminSecret: neo4j-admin-secret
# Environment variables
# Configuration
config:
# Memory settings
server.memory.heap.initial_size: "1G"
server.memory.heap.max_size: "2G"
server.memory.pagecache.size: "1G"
# Browser settings for Ingress
browser.remote_content_hostname_whitelist: "*"
browser.post_connect_cmd: "RETURN 'Connected via Ingress!'"
---
# Notes:
#
# 1. Prerequisites:
# - Ingress controller installed (e.g., nginx-ingress)
# - cert-manager installed for automatic TLS certificates
# - DNS configured to point neo4j.example.com to your ingress IP
#
# 2. Access Neo4j Browser:
# https://neo4j.example.com
#
# 3. For Bolt connections through Ingress (requires TCP support):
# - Use a TCP-capable ingress controller
# - Or use kubectl port-forward for Bolt:
# kubectl port-forward svc/ingress-cluster-client 7687:7687
#
# 4. Check Ingress status:
# kubectl get ingress
# kubectl describe ingress ingress-cluster-ingress