如何在K8s命名空间中运行external-IP(安装JupyterHub)。

huangapple go评论47阅读模式
英文:

how to run the external-IP in a K8s namespace (installing JupyterHub)

问题

我正在按照这里的说明进行操作:
https://z2jh.jupyter.org/en/stable/jupyterhub/installation.html

以在本地使用Kubernetes和Minikube安装Jupyter Hub。

几乎已经完成,如下图所示
如何在K8s命名空间中运行external-IP(安装JupyterHub)。

命名空间称为k8s-namespace-jose

我不得不运行以下命令:
kubectl --namespace get service proxy-public --output jsonpath='{.status.loadBalancer.ingress[].ip}';

以获取上面显示的EXTERNAL-IP。

问题在于访问以下网址:
http://104.196.41.97 无法工作(服务器未响应)

也不起作用:
http://104.196.41.97:80

我得到的错误是:
如何在K8s命名空间中运行external-IP(安装JupyterHub)。
我应该怎么做才能在本地服务器上运行我的jupyterhub?

编辑:
为了获取有关负载均衡器的所有信息:

名称:                     proxy-public
命名空间:                k8s-namespace-jose
标签:                   app=jupyterhub
                          app.kubernetes.io/managed-by=Helm
                          chart=jupyterhub-2.0.0
                          component=proxy-public
                          heritage=Helm
                          release=helm-release-name-jose
注释:              meta.helm.sh/release-name: helm-release-name-jose
                          meta.helm.sh/release-namespace: k8s-namespace-jose
选择器:                 component=proxy,release=helm-release-name-jose
类型:                     LoadBalancer
IP地址族策略:         SingleStack
IP地址族:              IPv4
IP地址:                10.103.131.233
IPs:                      10.103.131.233
外部IP地址:             104.196.41.97
端口:                     http  80/TCP
目标端口:               http/TCP
NodePort:                 http  32297/TCP
终端点:                10.244.0.13:8000
会话亲和性:         无
外部流量策略:  Cluster
事件:                   <none>
英文:

I am following the instructions here:
https://z2jh.jupyter.org/en/stable/jupyterhub/installation.html

to install locally with kubernetes and minikube a jupyter hub.

Its almost done as can be seen in the pic
如何在K8s命名空间中运行external-IP(安装JupyterHub)。

the namespace is called k8s-namespace-jose

I had to run the command:
kubectl --namespace <k8s-namespace> get service proxy-public --output jsonpath='{.status.loadBalancer.ingress[].ip}'

In order to get the EXTERNAL-IP shown above.

The thing is that going to:
http://104.196.41.97 does not work (server not responding)

nor the folowing works:
http://104.196.41.97:80

the error that I get is:
如何在K8s命名空间中运行external-IP(安装JupyterHub)。
What can I do in order to get my jupyterhub in my local server?

EDIT:
In order to have all the info about the loadbalancer:

Name:                     proxy-public
Namespace:                k8s-namespace-jose
Labels:                   app=jupyterhub
                          app.kubernetes.io/managed-by=Helm
                          chart=jupyterhub-2.0.0
                          component=proxy-public
                          heritage=Helm
                          release=helm-release-name-jose
Annotations:              meta.helm.sh/release-name: helm-release-name-jose
                          meta.helm.sh/release-namespace: k8s-namespace-jose
Selector:                 component=proxy,release=helm-release-name-jose
Type:                     LoadBalancer
IP Family Policy:         SingleStack
IP Families:              IPv4
IP:                       10.103.131.233
IPs:                      10.103.131.233
External IPs:             104.196.41.97
Port:                     http  80/TCP
TargetPort:               http/TCP
NodePort:                 http  32297/TCP
Endpoints:                10.244.0.13:8000
Session Affinity:         None
External Traffic Policy:  Cluster
Events:                   &lt;none&gt;

答案1

得分: 1

由于 minikube 安装,可能该地址是 minikube 集群的地址,而不是 External-IP。

您可以尝试使用 minikube IP 而不是 External IP 的替代方法吗?

sgrigori@sgrigori-vbox:~/Dev/jupyterhub$ minikube ip
192.168.49.2

并使用您的节点端口 32297

http://192.168.49.2:32297

英文:

Due to the minikube installation, probably the address is the address of minikube cluster and not the External-IP

Can you try an alternative to hit the minikube IP instead of the External IP?

sgrigori@sgrigori-vbox:~/Dev/jupyterhub$ minikube ip
192.168.49.2

and use your node port 32297

http://192.168.49.2:32297

huangapple
  • 本文由 发表于 2023年2月19日 21:53:18
  • 转载请务必保留本文链接:https://go.coder-hub.com/75500607.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定