仅可通过Pod访问AWS中的Kubernetes

时间:2020-07-13 16:33:46

标签: amazon-web-services kubernetes traefik amazon-eks

我有一个AWS EKS部署,可以到达吊舱并看到我的Node应用程序在下面运行

<catalog-component :product-category-name="'{{ $product_category_name }}'"></catalog-component>

我使用了Traefik,这是我所看到的:

http://a262f21c7a0c740949c3321ab77a0259-639235071.us-east-1.elb.amazonaws.com:8080

http://hostname-v1.local:8080/dashboard/

image1

但是,当我尝试使用Internet从互联网访问我的广告连播

kubectl exec -it my-app-898f57d6f-dsfg6 /bin/bash root@my-app-898f57d6f-dsfg6:/usr/src/app# curl localhost **Hello World!!**

我这样无法获得服务:

image2

所以我的问题是,即使服务器正常运行,为什么也无法通过互联网访问服务器?

请注意,hostname-v1.local仅仅是/ etc / hosts映射到traefik LoadBalancer IP的

http://hostname-v1.local

所以

traefik-ingress-service   LoadBalancer   10.100.113.186   a262f21c7a0c740949c3321ab77a0259-639235071.us-east-1.elb.amazonaws.com

返回

host a262f21c7a0c740949c3321ab77a0259-639235071.us-east-1.elb.amazonaws.com

我所做的只是在/ etc / hosts

a262f21c7a0c740949c3321ab77a0259-639235071.us-east-1.elb.amazonaws.com has address 34.195.130.205
a262f21c7a0c740949c3321ab77a0259-639235071.us-east-1.elb.amazonaws.com has address 107.22.153.204
a262f21c7a0c740949c3321ab77a0259-639235071.us-east-1.elb.amazonaws.com has address 52.44.97.64

我只是想做

cat /etc/hosts 34.195.130.205 hostname-v1.local

http://hostname-v1.local

然后回来:

curl hostname-v1.local

像豆荚一样

有人可以帮忙找出问题所在吗?

BR

0 个答案:

没有答案