Skip to content

Latest commit

 

History

History
58 lines (46 loc) · 2.08 KB

LINKERD.md

File metadata and controls

58 lines (46 loc) · 2.08 KB

linkerd

The linkerd service mesh is a process that runs on each node of your Kubernetes cluster, manages the communication between pods, and provides:

Deploying linkerd on Kismatic

Once you have a working Kismatic cluster, linkerd can be deployed with one command:

kubectl --kubeconfig generated/kubeconfig apply -f ansible/roles/addon-linkerd/templates/linkerd.yml

Using linkerd

To take advantage of the linkerd service mesh your apps must do two things. First, your app must send requests through linkerd. For many applications, this can be done without code changes by using linkerd as an HTTP proxy. For example, Go, C, Ruby, Perl, and Python applications can set the http_proxy environment variable to direct all HTTP calls through linkerd. You should set the environment variable to the node name on port 4140. This can easily be accomplished using the downward API, like this:

env:
- name: NODE_NAME
  valueFrom:
    fieldRef:
      fieldPath: spec.nodeName
command:
- "/bin/bash"
- "-c"
- "HTTP_PROXY=$(NODE_NAME):4140 python hello.py"

Second, the Kubernetes service object for your app must define a port named http in the default namespace where the app will accept requests (these defaults can be changed in the linkerd.yml).

Applications can then make requests to http://hello and the request will be routed to the hello service through the linkerd service mesh.

More Info

For more info about linkerd as a service mesh for Kubernetes, see this blog series or visit linkerd.io.