Skip to content

Instantly share code, notes, and snippets.

Avatar

Dawn Chen dchen1107

  • Google
  • United States
View GitHub Profile
View setup-bridge.sh
#!/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
View request.sh
#!/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
@dchen1107
dchen1107 / kops-cluster-dump
Created Oct 31, 2017
kops get cluster -oyaml --full on 1.7.4 k8s cluster on GCE
View kops-cluster-dump
apiVersion: kops/v1alpha2
kind: Cluster
metadata:
creationTimestamp: 2017-10-30T19:36:43Z
name: a.k8s.local
spec:
api:
loadBalancer:
type: Public
authorization:
View gke-cluster-configuration-1-7-6
================= /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
View gce-cluster-configuration-1-7-6
================= /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