apt-get install -y bridge-utils
// Remove Docker bridge
iptables -t nat -F
ifconfig docker0 down
brctl delbr docker0
iptables -t nat -A POSTROUTING ! -d 10.0.0.0/8 -o eth0 -j MASQUERADE
sysctl net.ipv4.ip_forward=1
// Re-start docker with K8S's bridge
docker daemon -H unix:///var/run/docker.sock --bridge=cbr0 --iptables=false --ip-masq=false
export CLUSTER_NAME=k8s_cluster
export CONTEXT_NAME=k8s_cxt
export CONTEXT_USER=root
export MASTER_IP=ma1demo2:8888
kubectl config set-cluster $CLUSTER_NAME --server=http://$MASTER_IP --insecure-skip-tls-verify=true
kubectl config set-context $CONTEXT_NAME --cluster=$CLUSTER_NAME --user=$CONTEXT_USER
kubectl config use-context $CONTEXT_NAME
kubelet --allow-privileged=true --api-servers=http://ma1demo2:8888 --configure-cbr0=true
kube-proxy --master=http://ma1demo2:8888
docker run --privileged --net=host -d quay.io/coreos/etcd \
--listen-client-urls http://0.0.0.0:4001 \
--advertise-client-urls http://9.21.58.21:4001
kube-apiserver --allow-privileged=true --address=`hostname -i` \
--etcd-servers=http://ma1demo1:4001 \
--service-cluster-ip-range=10.10.10.0/24 --port=8888
kube-controller-manager --master=http://ma1demo2:8888 --allocate-node-cidrs=true \
--cluster-cidr=10.0.0.0/16
kube-scheduler --address=`hostname -i` --master=http://ma1demo2:8888