Hi,
All pods, svc, ingress are running but I get a bad gateway error when I try to reach the website in browser. There are some problems in the logs of my ingress nginx controller kubectl logs ingress-nginx-controller-76df688779-bxvjn:
Thanks for your response. How should i make sure ingresscontroller is allowed to? Should i add that annotation you mentioned in the ingresscontrollerpod? Or jupyterhub config file?
In Liveness & readiness probes failed z2jh you mentioned you were having problems with a multi-cluster k3s deployment. Are you 100% sure the cluster is fully working? If it’s only partially configured some things may work, others won’t, and some things may intermittently work.
I couldn’t make it work in a multicluster so i sticked to a single cluster. Now all pods and services and ingress from jupyterhub side is working and i no longer have liveness & rediness problem. But this bad gateway error persists
Although the hub status is running I found this also in the logs of hub pod, repeatedly
[E 2024-01-28 00:48:47.189 JupyterHubSingleUser] Failed to connect to my Hub at http://hub:8081/hub/api (attempt 1/5). Is it running?
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/jupyterhub/singleuser/extension.py", line 336, in check_hub_version
resp = await client.fetch(self.hub_auth.api_url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ConnectionRefusedError: [Errno 111] Connection refused
And here is the result of k describe pod hub...:
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning FailedScheduling 2m49s default-scheduler 0/1 nodes are available: pod has unbound immediate PersistentVolumeClaims. preemption: 0/1 nodes are available: 1 Preemption is not helpful for scheduling..
Normal Scheduled 2m47s default-scheduler Successfully assigned default/hub-856b4799c4-55nbq to k3s-master-01
Normal Pulled 2m47s kubelet Container image "bpfrd/nbgrader-hub:latest" already present on machine
Normal Created 2m47s kubelet Created container hub
Normal Started 2m47s kubelet Started container hub
So maybe these two issues are related? I was wondering if you have any idea about this log?
best
It might be helpful to mention that the same script ran perfectly on two different servers. But running it on this server gives various errors in the logs. It’s the same server where I had problems with multi-cluster k3s.
I was wondering if,
1 - it is a networking issue?
2 - how can I run hub and proxy pods on 0.0.0.0? does it help? Does it help?
3 - I set networkpolicy to false but does it help if I explicitly set network policies? what should I do in this way? is there any example
4 - is there anyway to find out if there are some restrictions on this server that prevents networking?
I think it’s worth taking a step back, and focussing on k3s/k8s. One of the major advantages of Kubernetes is that it’s a standard platform that is (more or less) agnostic to the underlying hardware or cloud provider. This makes it a lot easier to write and deploy applications on it.
The big downside is it means the K8s admin, i.e. you, are responsible for ensuring K8s is setup correctly. This may include installing and configuring some addons, configuring the K8s cluster itself, checking there are no weird hardware/storage/networking issues, etc. For example, some k8s distributions don’t include network policies, dynamic storage, load balancers or ingress by default and if they do they may still require some additional configuration.
Given you’ve had problems with your existing server, and you’re not sure about what state it’s in, I think it’d be worth starting with a completely new server and make notes of everything you do.