Created
December 15, 2018 05:40
-
-
Save cjbottaro/517470a452deafc55dc222aa3b3b816d to your computer and use it in GitHub Desktop.
HostPort for kube-router
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
data: | |
cni-conf.json: |- | |
{ | |
"cniVersion":"0.3.0", | |
"name":"kube-router-net", | |
"plugins":[ | |
{ | |
"name":"kubernetes", | |
"type":"bridge", | |
"bridge":"kube-bridge", | |
"isDefaultGateway":true, | |
"ipam":{ | |
"type":"host-local" | |
} | |
}, | |
{ | |
"type":"portmap", | |
"capabilities":{ | |
"snat":true, | |
"portMappings":true | |
} | |
} | |
] | |
} |
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
spec: | |
template: | |
spec: | |
containers: | |
- name: kube-router | |
env: | |
- name: KUBE_ROUTER_CNI_CONF_FILE | |
value: /etc/cni/net.d/10-kuberouter.conflist | |
image: cloudnativelabs/kube-router:v0.2.3 | |
initContainers: | |
- name: install-cni | |
command: | |
- /bin/sh | |
- -c | |
- set -e -x; if [ ! -f /etc/cni/net.d/10-kuberouter.conflist ]; then TMP=/etc/cni/net.d/.tmp-kuberouter-cfg; | |
cp /etc/kube-router/cni-conf.json ${TMP}; mv ${TMP} /etc/cni/net.d/10-kuberouter.conflist; | |
fi | |
tolerations: | |
- operator: Exists |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment