在我的< node-ip>:< node-port> 无法到达的。
I followed this tutorial:
教程说,我可能必须“创建一个允许在您的节点端口上进行TCP流量的防火墙规则”,但我不知道该怎么做。
安全组似乎允许任何流量:
In my OVH Managed Kubernetes cluster I'm trying to expose a NodePort service, but it looks like the port is not reachable via <node-ip>:<node-port>
.
I followed this tutorial: Creating a service for an application running in two pods. I can successfully access the service on localhost:<target-port>
along with kubectl port-forward
, but it doesn't work on <node-ip>:<node-port>
(request timeout) (though it works from inside the cluster).
The tutorial says that I may have to "create a firewall rule that allows TCP traffic on your node port" but I can't figure out how to do that.
The security group seems to allow any traffic:

发布评论
评论(3)
解决方案是在创建托管的Kubernetes群集时不启用“私人网络”(“RéseauPrivéstacté”)。
如果您已经付费了节点或配置的DNS或其他任何内容,则可以选择当前的Kubernetes群集,然后选择“重置您的群集”(“Réinitialiservotre cluster”),然后选择“保留和重新安装节点”(“ Conserver etréinstallerles noeuds noeuds noeuds noeuds ”)和在“私人网络附件”(“réseauprivéstacté”)选项中,选择“无(public ips)”(“ aucun(ips publiques)”),
我面临相同的用例和问题,以及经过一些研究,然后进行了一些研究和问题。实验,从这个对话框上的小评论中得到了提示:
现在我得到了我的Traefikikik使用
hostnetwork
作为登录作为登录,即使在低端口上也可以直接到达(如您所见,默认安全组是打开的)The solution is to NOT enable "Private network attached" ("réseau privé attaché") when you create the managed Kubernetes cluster.
If you already paid your nodes or configured DNS or anything, you can select your current Kubernetes cluster, and select "Reset your cluster" ("réinitialiser votre cluster"), and then "Keep and reinstall nodes" ("conserver et réinstaller les noeuds") and at the "Private network attached" ("Réseau privé attaché") option, choose "None (public IPs)" ("Aucun (IPs publiques)")
I faced the same use case and problem, and after some research and experimentation, got the hint from the small comment on this dialog box:
Now i got my Traefik ingress as a DaemonSet using
hostNetwork
and every node is reachable directly even on low ports (as you saw yourself, the default security group is open)好吧,我猜想进一步忍不住了,但是我会检查以下内容:
https://kubernetes.io/kubernetes.io/docs.io/docs/concepts/services-networks/services-networks/services-networking/service-networking/service-networking/service-networking/service-networking/service/service/service/ /#LoadBalancer
,否则建议您进行入口(如果有效,您可以排除任何与防火墙相关的任何与防火墙相关的信息问题)。
此页面解释很好:
clusterip,nodeport和nodeport和nodeport and nodePort and nodePort and nodeport and nodeport and nodeport and nodeport and nodeport和kubernetes中的LoadBalancer服务类型?
Well i can't help any further i guess, but i would check the following:
https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer
Otherwise, i would suggest an Ingress, (if this works, you may exclude any firewall related issues).
This page explains very well:
What's the difference between ClusterIP, NodePort and LoadBalancer service types in Kubernetes?
在AWS中,您有一个称为安全组的东西...您可能在K8S提供商(甚至本地机器)中拥有相同的东西。请将这些端口添加到安全组或本地防火墙中。在AWS中,您可能还需要将这些安全组绑定到您的EC2实例(入口节点)。
In AWS, you have things called security groups... you may have the same kind of thing in you k8s provider (or even your local machine). Please add those ports to the security groups or local firewalls. In AWS you may need to bind those security groups to your EC2 instance (Ingress node) as well.