Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Kubernetes服务的ExternalIP_Kubernetes - Fatal编程技术网

Kubernetes服务的ExternalIP

Kubernetes服务的ExternalIP,kubernetes,Kubernetes,我需要一些帮助来理解Kubernetes服务中的ExternalIP字段。 根据信息 我知道我可以定义Kubernetes服务并使用ExternalIP字段分配Ip地址。 为了测试这一点,我使用Rancher在AWS上创建了一个Kubernetes环境。在Kubernetes集群中,我部署了一个映像,创建了一个Nodeport服务,并为Nodeport服务分配了一个ElasticIp。 我的期望是,我将能够使用ElasticIP:Nodeport访问该服务 然而,政府没有回应。我得到的错误目标不

我需要一些帮助来理解Kubernetes服务中的ExternalIP字段。 根据信息 我知道我可以定义Kubernetes服务并使用ExternalIP字段分配Ip地址。 为了测试这一点,我使用Rancher在AWS上创建了一个Kubernetes环境。在Kubernetes集群中,我部署了一个映像,创建了一个Nodeport服务,并为Nodeport服务分配了一个ElasticIp。 我的期望是,我将能够使用ElasticIP:Nodeport访问该服务

然而,政府没有回应。我得到的错误目标不可用

如果我运行命令

kubectl get svc -n namepace
我可以看到弹性ip场下的弹性ip


然后,我在没有ExternalIp字段的情况下部署了相同的服务。这次是Nodeport服务。我可以使用Nodeipaddress:Nodeport访问部署。

是否将外部ip连接到节点?是的,我也尝试过。这也不起作用。我认为将外部ip连接到节点应该起作用。在防火墙/安全组设置中,检查端口
Nodeport
上的节点是否允许传入流量。因为如果我没有记错,默认情况下所有传入流量都在AWS上被阻止。这是在vpc上。Ip地址没有规则。节点可以通过其自己的ip地址访问。我将在on-Prem部署上尝试相同的配置。我将在那里试一试。因此,如果我将外部ip分配给那里的节点,那么当节点死亡时服务将无法访问的问题仍然存在,对吗?