Traefik Intress用于外部服务故障排除
请一点帮助。
我试图让Traefik充当实验室中所有内容的入学,K8S托管了Docker主机上托管的POD/Services和外部服务。
我已经为要达到的服务创建了一个外部服务对象:
kind: Service
metadata:
name: whoami
namespace: default
spec:
type: ExternalName
externalName: ha.local.lan
ports:
- name: http
port : 49153
targetPort: 49153
然后,我为该服务创建了一个IngressRoute对象:
kind: IngressRoute
metadata:
name: whoami
#namespace: default
spec:
# tls: {}
entryPoints:
- web
routes:
- kind: Rule
match: Host(`whoami.local.lan`) && PathPrefix(`/`)
services:
# The service name and port must match the Service
# specified in the deploy file
- name: whoami
port: 49153
路由器出现在Traefik中,但是流量的路由到端口49153似乎不起作用。我可以达到DNS名称,但是我仍然必须将端口添加到我的URL中才能到达站点。
我在这里错过了什么吗?
Need a little assistance please.
I'm trying to get Traefik to act as an ingress for everything in my lab, both K8s hosted pods/services and external services hosted on a Docker host.
I have created an external service object for the service I want to reach:
kind: Service
metadata:
name: whoami
namespace: default
spec:
type: ExternalName
externalName: ha.local.lan
ports:
- name: http
port : 49153
targetPort: 49153
then, I have created an IngressRoute object for that service:
kind: IngressRoute
metadata:
name: whoami
#namespace: default
spec:
# tls: {}
entryPoints:
- web
routes:
- kind: Rule
match: Host(`whoami.local.lan`) && PathPrefix(`/`)
services:
# The service name and port must match the Service
# specified in the deploy file
- name: whoami
port: 49153
The router appears in Traefik just fine, but the routing of the traffic to port 49153 doesn't seem to work. I can reach the dns name, but I still have to add the port to my URL to reach the site.
Have I missed something here?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论