kubernetes-neo4j
kubernetes-neo4j copied to clipboard
Deploying to gke with internal load balancing
Hi! I am trying to run neo4j on gke (google container engine) with an internal load balancer. While I am able to standup the pods and connect to them via kubectl, I am not able to connect to the instances via my internal load balancer (trying to connect to neo4j via 10.0.0.3:7687) Keep in mind I am very new to google container engine... Here are the changes I made to dns.yaml
kind: Service
metadata:
name: neo4j
annotations:
cloud.google.com/load-balancer-type: "Internal"
labels:
app: neo4j
component: core
spec:
type: LoadBalancer
loadBalancerIP: 10.0.0.3
# clusterIP: None
ports:
- port: 7474
targetPort: 7474
name: browser
- port: 6362
targetPort: 6362
name: backup
- port: 7687
targetPort: 7687
name: bolt
selector:
app: neo4j
component: core
Let me know if I am missing something!
I am also looking into a similar thing where I want to be able to access the cluster from another cluster. For this I setup a LoadBalancer as you did, just without the loadBalancerIP property and I was able to access the cluster from other hosts within the network.
For some reason though not all Pods are able to join the cluster #2 and once they are down still get traffic from the load balancer resulting in dead requests #3.
Did you get further with this?
I am running into a similar problem. Did anyone ever solve this? I have setup neo4j on AWS EKS. Internally everything is running fine using kubectl. But when I try to connect my API project using the javscript driver. Or when I expose neo4j using a load balancer I cannot connect. Giving me the following error "Could not perform discovery. No routing servers available"
I solved my issue of connecting to the Leader in this way: https://github.com/neo4j-contrib/kubernetes-neo4j/issues/16#issuecomment-459989643
I didn't use an external load balancer (I tried but failed), but maybe this gives someone an idea how to fix this for yourself.