Created
January 31, 2018 01:46
-
-
Save negz/87df3c2916b1af346ff7305bbd3adbda to your computer and use it in GitHub Desktop.
linkerd init container for transparent HTTP proxy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
initContainers: | |
- name: linkerd-transparent-proxy | |
env: | |
- name: L5D_HOST | |
valueFrom: | |
fieldRef: | |
fieldPath: status.hostIP | |
- name: L5D_PORT | |
value: "4140" | |
image: googlecontainer/debian-iptables-amd64:v9 | |
securityContext: | |
privileged: true | |
command: ['sh', '-c', 'iptables -t nat -A OUTPUT -p tcp -j DNAT -m multiport --dports 80 --to ${L5D_HOST}:${L5D_PORT} -m comment --comment "send all HTTP traffic via linkerd"'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment