If it is exposed via a service type LoadBalancer, ensure the protocol between the load balancer and NGINX is set to TCP. See Kubernetes documentation for more information.
Lenses can be placed behind a proxy, but you must allow websocket connections.
These two paths are used for WebSocket connections:
/api/ws
/api/kafka/ws
Disable proxy buffering for SSE (Server Sent Events) connections on this path:
/api/sse
TLS termination
Lenses supports TLS termination out of the box, see Enabling TLS
Sample Apache configuration
# Add these settings to your httpd.conf or under the VirtualHost section# for Lenses.# The rewrite directives need the rewrite module:# LoadModule rewrite_module modules/mod_rewrite.so# The proxy directives need the proxy, proxy_http and proxy_wstunnel modules:# LoadModule proxy_module modules/mod_proxy.so# LoadModule proxy_http_module modules/mod_proxy_http.so# LoadModule proxy_wstunnel_module modules/mod_proxy_wstunnel.soRewriteEngineOnRewriteCond%{HTTP:Upgrade}=websocket [NC]RewriteRule^/(.*)$ ws://lenses.url:9991/$1 [P,L]RewriteCond%{HTTP:Upgrade}!=websocket [NC]RewriteRule^/(.*)$ http://lenses.url:9991/$1 [P,L]ProxyRequestsOnProxyPreserveHostOnProxyPass/http://lenses.url:9991/ProxyPassReverse/http://lenses.url:9991/