Enterprise Search with Kubernetes, issues accessing it

Hi,

I'm trying to set up Enterprise Search with Kubernetes creating my own Dockerfiles.
I have it working, but I'm having issues accessing it through Kubernetes ingress.

Let's say my Kubernetes IP is: 192.168.64.2 and the Ingress path of Enterprise Search is: /enterprise-search

When accessing http://192.168.64.2/enterprise-search/ I reach Enterprise Search UI but I'm redirected to http://192.168.64.2/login but I was expecting to be redirected to http://192.168.64.2/enterprise-search/login

Is there a way to configure this different path on Enterprise Search? Or is there a way of bypassing it on Kubernetes ingress configuration?

2 Likes

I believe there is! You should be able to set an ent_search.external_url config setting in your enterprise-search.yml file. (Example configuration docs link)

So in your specific case, I think you should be able to set

ent_search.external_url: 'http://192.168.64.2/enterprise-search'

and /login should append correctly. Let me know if that's not the case however!

Hi Constance, thank you for the quick response.

I have tried it before and tried again now, this is the message I got when starting the application with ent_search.external_url: 'http://192.168.64.2/enterprise-search' :

The setting '#/ent_search/external_url' cannot have a path: 'http://192.168.64.2/enterprise-search'

This is my Dockerfile:

    FROM docker.elastic.co/enterprise-search/enterprise-search:7.10.0

    ENV elasticsearch.host 'http://elasticsearch-master.tse.svc.cluster.local:9200'
    ENV ent_search.external_url 'http://192.168.64.2/enterprise-search'
    ENV allow_es_settings_modification true
    ENV secret_management.encryption_keys ['4a2c...']

    EXPOSE 3002

It looks like I cannot have a path on that config.

Ahh super sorry, I hadn't realized external_url didn't allow paths for some reason. I'm checking with more folks now to figure out why that's the case :frowning:

In the meanwhile, it's possible a reverse proxy would work to get you the URL you want, if you're open to trying that.

Hey hey! Super sorry to return with bad news, but it turns out even a reverse proxy wouldn't work because of how we enforce external_url across all layers of the app. It looks like we just simply don't support custom paths in Enterprise Search URLs right now, although it's certainly a feature/enhancement request to be made. It sounds like it'd be something of a dev lift, so we'd want to balance it with # of users needing it, etc.

Regarding your initial problem of Kubernetes ingress, would it be possible to set the path to / and the port to :3002 (or any other custom port of your choosing)?

Hello Constance,

Thanks again for your support.
I discovered that I can use Amazon Elasticsearch Service on my Organization and noticed that there is enterprise-search on AWS Market place: https://aws.amazon.com/marketplace/solutions/data-analytics/enterprise-search

So I believe I'll be able to setup this on AWS.

Cloud by Elastic, also available if needed from AWS Marketplace is one way to have access to all features, all managed by us. Think about what is there yet like Security, Monitoring, Reporting, SQL, Canvas, Maps UI, Alerting and built-in solutions named Observability, Security, Enterprise Search and what is coming next :slight_smile: ...

Basically you won't have to create manually a cluster on AWS. Cloud by elastic does all that for you in few clicks.

1 Like

Thanks David,
I'm going to try Elastic Cloud (Elasticsearch managed service) on AWS Marketplace.

1 Like

Hello Constance,

please add my vote for custom paths support in Enterprise Search URLs.