Skip to content

Instantly share code, notes, and snippets.

@ekroon
Last active October 20, 2016 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ekroon/695bddd5eb66eaf726bb24290c3b19b7 to your computer and use it in GitHub Desktop.
Save ekroon/695bddd5eb66eaf726bb24290c3b19b7 to your computer and use it in GitHub Desktop.
Linkerd TLS custom routing
admin:
port: 9990
routers:
- protocol: http
label: outgoing-normal
servers:
- port: 8080
ip: 0.0.0.0
- protocol: http
label: outgoing-tls
client:
tls:
kind: io.l5d.boundPath
names:
- prefix: "/$/inet/{host}/*"
commonNamePattern: "{host}"
servers:
- port: 8443
ip: 0.0.0.0
#!/usr/bin/env bash
http_proxy="http://localhost:8080" curl -v -XGET "http://www.google.nl/?q=linkerd.io" -H "l5d-dtab: /http/1.1/* => /$/inet/www.google.com/80"
#!/usr/bin/env bash
http_proxy="http://localhost:8443" curl -v -XGET "http://www.google.nl/?q=linkerd.io" -H "l5d-dtab: /http/1.1/* => /$/inet/www.google.com/443"

Linkerd custom proxying

  • ./start-linkerd.sh
  • ./google-normal.sh
  • ./google-tls.sh
  • ./stop-linkerd.sh
#!/usr/bin/env bash
docker run -d --name linkerd -v `pwd`/config.yaml:/config.yaml -p9990:9990 -p8080:8080 -p8443:8443 buoyantio/linkerd:0.8.1 /config.yaml
#!/usr/bin/env bash
docker rm -f linkerd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment