How to use weaviate client v4 to connect to a self hosted instance on k8s

Description

I have a self hosted weaviate instance consisting of 4 nodes running on a k8s cluster on azure. This is behind a spring cloud gateway and accessed from outside through a path /weaviate and gets routed to the the running weaviate instance.
Python client V3 accepts a url parameter, but V4 client is not using the base path.

How can i connect to the weaivate instance from outside the cluster by using the path ? eg. https://app.example.com/weaviate

Server Setup Information

  • Weaviate Server Version: 1.26.1
  • Deployment Method: k8s
  • Multi Node? Number of Running Nodes: 4
  • Client Language and Version: Python and Java
  • Multitenancy?: No

Any additional Information

I solved this for https by creating a listener and rewrite rule in application gateway. But I am not sure how to expose the grpc service via the application gateway? Any help is greatly appreciated.

hi @Chaitanya_Bhagavan !!

Welcome to our community :hugs:

We do not provide specific instructions on how to properly expose Weaviate in different services, as they may vary a lot.

The bottom line is the same as exposing a GRPC.

One way to test is using tools like grpcurl:

This is how I have done it for traefik, using docker compose, for example:

Let me know if this helps!

Thanks!