简体   繁体   English

linkerd,kubernetes和dtab

[英]linkerd, kubernetes and dtab

I'am very new to linkerd in Kubernetes, and I don't feel very comfortable with dtab and routing. 对于Kubernetes中的链接器,我是一个新手,但对dtab和路由我不太满意。

I followed this quite easy "getting started guide" step by step : https://blog.buoyant.io/2016/10/04/a-service-mesh-for-kubernetes-part-i-top-line-service-metrics/ 我逐步遵循了这个非常简单的“入门指南”: https : //blog.buoyant.io/2016/10/04/a-service-mesh-for-kubernetes-part-i-top-line-service-指标/

Everything works fine, but it does not give deep explanations on how the whole thing is working. 一切正常,但没有对整个过程的运行方式进行深入的解释。

So, I have these "incoming" rules : 因此,我有以下“传入”规则:

/srv=>/#/io.l5d.k8s/default/http; /host=>/srv; /svc=>/host; /host/world=>/srv/world-v1

In the tutorial, to test that it works, I need to make this curl request : 在本教程中,为了测试它是否有效,我需要发出以下curl请求:

$ http_proxy=$INGRESS_LB:4140 curl -s http://hello

.. and it works! ..并且有效! But I don't really know how my http://hello became a /svc/hello ... how and where this magic happened? 但是我真的不知道我的http://hello是如何变成/svc/hello

I see that the "default" namespace is "hardcoded" in /#/io.l5d.k8s/default/http , so I suppose that I cannot reach a service located in another namespace. 我在/#/io.l5d.k8s/default/http看到“默认”名称空间是“硬编码的”,因此我想我无法访问位于另一个名称空间中的服务。 How can I udpate the rules to do such a thing? 我该如何通过规则来做这样的事情?

Thank you to help me progress with linkerd ^^ 谢谢您帮助我进步与linkerd ^^

Here you can find documentation about how http://hello becomes /svc/hello 在这里,您可以找到有关http://hello如何变为/svc/hello文档

Regarding accessing a service in a different namespace you can use something like http://service.namespace then have some dtabs so they eventually use the kubernetes service discovery namer io.l5d.k8s using the right namespace and service name. 关于在不同名称空间中访问服务,可以使用http://service.namespace然后使用一些dtab,以便最终使用正确的名称空间和服务名称使用kubernetes服务发现名称io.l5d.k8s See this for more informaiton 为更多的情报

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM