Syntax highlighting

This commit is contained in:
John Mulhausen
2016-02-16 17:53:42 -08:00
parent bbeb111863
commit ee72211075
115 changed files with 1922 additions and 1919 deletions
+6 -6
View File
@@ -107,11 +107,11 @@ on that subnet, and is passed to docker's `--bridge` flag.
We start Docker with:
{% highlight sh %}
```shell
DOCKER_OPTS="--bridge=cbr0 --iptables=false --ip-masq=false"
{% endhighlight %}
```
This bridge is created by Kubelet (controlled by the `--configure-cbr0=true`
flag) according to the `Node`'s `spec.podCIDR`.
@@ -126,20 +126,20 @@ masquerade (aka SNAT - to make it seem as if packets came from the `Node`
itself) traffic that is bound for IPs outside the GCE project network
(10.0.0.0/8).
{% highlight sh %}
```shell
iptables -t nat -A POSTROUTING ! -d 10.0.0.0/8 -o eth0 -j MASQUERADE
{% endhighlight %}
```
Lastly we enable IP forwarding in the kernel (so the kernel will process
packets for bridged containers):
{% highlight sh %}
```shell
sysctl net.ipv4.ip_forward=1
{% endhighlight %}
```
The result of all this is that all `Pods` can reach each other and can egress
traffic to the internet.