I am having a jupyter container on k8s and running the below code
import gradio as gr
def greet(name):
return "Hello " + name + "!"
demo = gr.Interface(fn=greet, share=True, inputs="text", outputs="text")
demo.launch(debug=True, share=True)
What happens as the result of this is that gradio opens a random port and then tunnels it to a public IP on its own server and gives a link which is https://.gradio.live
This link is public and could be a way for exploitation. Is there any way I can stop this behaviour. I have already specified network policy in k8s with ingress allowed only on the jupyterlab port 8888. But still this public link keeps working.
Please assist on the above.
I am trying to disable the tunneling behaviour into a k8s pod.
Application of network policy to allow ingress only on 8888(jupyterlab) pod was supposed to work but sadly it did not work.