EventStore / EventStore.Charts

EventStore official Helm Charts
Other
29 stars 47 forks source link

[bug] Admin interface not available from port forward #29

Closed ameier38 closed 5 years ago

ameier38 commented 5 years ago

Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT

Version of Helm and Kubernetes: Helm v2.12.0 Kube v1.10.11

Which chart: eventstore

What happened: Installing chart and then running kubectl port-forward svc/eventstore-admin 2113 works but when navigating to localhost:2113 the admin interface is not available and looks like it is receiving the wrong ip address.

What you expected to happen: The admin interface would be available through port-forward

How to reproduce it (as minimally and precisely as possible):

helm repo add eventstore https://eventstore.github.io/EventStore.Charts
helm repo update
helm install -n eventstore eventstore/eventstore
kubectl port-forward svc/eventstore-admin 2113
hnicke commented 5 years ago

I think this relates to the EVENTSTORE_EXT_IP_ADVERTISE_AS env being set to statuspodIP in the statefulset. If you remove this env, you will notice that you can access both eventstore-admin and eventstore service via port-forward.

We have already talked about related stuff over here. However, you mentioned if we don't set this env var, clustering would be broken.

Currently my team uses my fork with the removed env variable as we don't need to cluster eventstore yet but rely heavily on port-forward. I'd be very happy to see a solution here!

ameier38 commented 5 years ago

Yea I think you are right. I have been trying to wrap my head around the networking, specifically how the gossip works, but going to need help.

Are you able to connect to the database using port-forward? I can only seem to get the admin interface working if I remove the EVENTSTORE_EXT_IP_ADVERTISE_AS as you did. When I was testing this a while back I thought I was able to get it working but now I am running into issues.

I try to connect using the following:

helm install -n eventstore .
kubectl port-forward svc/eventstore 2113

But it fails using discover://localhost:2113 as the uri. If I connect from inside the cluster using discover://eventstore:2113 then it works fine.

riccardone commented 5 years ago

Here is a bit more info about advertise-as and when use it https://eventstore.org/docs/server/ports-and-networking/index.html?#advertise-as I'm also trying to fix that issue. It doesn't look right having both EXT_IP and EXT_IP_ADVERTISE_AS both assigned with status.podIP

ameier38 commented 5 years ago

@hnicke https://github.com/EventStore/EventStore.Charts/pull/30 should allow port-forwarding out of the box against a single node.