This file contains 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
================= /etc/kubernetes/addons/cluster-loadbalancing/glbc/default-svc.yaml ================== | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
# This must match the --default-backend-service argument of the l7 lb | |
# controller and is required because GCE mandates a default backend. | |
name: default-http-backend | |
namespace: kube-system | |
labels: | |
k8s-app: glbc |
This file contains 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
================= /etc/kubernetes/addons/cluster-loadbalancing/glbc/default-svc.yaml ================== | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
# This must match the --default-backend-service argument of the l7 lb | |
# controller and is required because GCE mandates a default backend. | |
name: default-http-backend | |
namespace: kube-system | |
labels: | |
k8s-app: glbc |
This file contains 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
apiVersion: kops/v1alpha2 | |
kind: Cluster | |
metadata: | |
creationTimestamp: 2017-10-30T19:36:43Z | |
name: a.k8s.local | |
spec: | |
api: | |
loadBalancer: | |
type: Public | |
authorization: |
This file contains 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
#!/bin/bash | |
# References | |
# http://www.computerhope.com/unix/nc.htm#03 | |
# https://github.com/daniloegea/netcat | |
# http://unix.stackexchange.com/questions/26715/how-can-i-communicate-with-a-unix-domain-socket-via-the-shell-on-debian-squeeze | |
# http://unix.stackexchange.com/questions/33924/write-inside-a-socket-open-by-another-process-in-linux/33982#33982 | |
# http://www.linuxjournal.com/content/more-using-bashs-built-devtcp-file-tcpip | |
# http://www.dest-unreach.org/socat/ | |
# http://stuff.mit.edu/afs/sipb/machine/penguin-lust/src/socat-1.7.1.2/EXAMPLES |
This file contains 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
#!/bin/bash -e | |
IFADDR="192.168.3.1/24" | |
if [[ ! ip link show docker0 ]]; then | |
ip link add docker0 type bridge | |
ip addr add "$IFADDR" dev docker0 | |
ip link set docker0 up | |
iptables -t nat -A POSTROUTING -s "$IFADDR" ! -d "$IFADDR" -j MASQUERADE | |
fi |