-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
set spec hostname to get headless service to work #626
base: main
Are you sure you want to change the base?
Conversation
Thanks for submitting your first pull request! You are awesome! 🤗 |
Thanks @kagesenshi! pod.spec.hostname = name
return pod I'm not yet confident enough to merge this, thinking about questions like this:
Unless we are confident this is a good default, I suggest we instead recommend that users running into this use |
unfortunately i don't think i have an answer for that. How I found out the fix is by comparing the containers that was created in k8s through k8s yml component yml file and finding the key that was missing, the most obvious missing key was this. hostname afaik is limited to valid DNS domain characters and subject to the usual DNS character limits. iirc when trying to solve this, |
You can use |
the issue here is not about setting pod_name_template, but rather this pod name is not being applied as container hostname itself, causing internal DNS resolution of services to not work correctly. |
Sorry, I mean that you can use |
It sounds like |
Notebook pod hostname could not be resolved from another pod through headless service. Setting pod.spec.hostname to pod name will get it to work.
Other people affected:
https://discourse.jupyter.org/t/how-to-run-single-user-pod-in-headless-mode-so-that-i-can-run-spark-jobs-on-an-external-hadoop-cluster/13806
https://gitter.im/jupyterhub/jupyterhub?at=5e316125f301780b83439232
https://groups.google.com/g/jupyter/c/UxeDkxAmuTI/m/tV0jN5ZxAwAJ