How is environment variables like HUB_SERVICE_HOST set?

I saw this in

c.JupyterHub.hub_connect_ip = os.environ['HUB_SERVICE_HOST']
c.JupyterHub.hub_connect_port = int(os.environ['HUB_SERVICE_PORT'])

I didn’t find anywhere setting these environment variables.

1 Like

It took a long time for me to figure out :smiley: the answer is that it is done by k8s automatically with k8s Services in the namespace as i understand it.

Write kubectl get service for the given namespace and you see other services that also will cause environment variables.