There is one important security note when using firewalls on Google Compute Engine:
Firewalls are defined per-vm, rather than per-ip address. This means that if you open a firewall for that service's ports,
anything that serves on that port on that VM's host IP address may potentially serve traffic.
Note that this is not a problem for other Kubernetes services, as they listen on IP addresses that are different than the
host node's external IP address.
as of kubernmetes v1.0.0, GCE firewalls are defined per-vm, rather than per-ip
address. This means that when you open a firewall for a service's ports,
anything that serves on that port on that VM's host IP address may potentially
serve traffic. Note that this is not a problem for other Kubernetes services,
as they listen on IP addresses that are different than the host node's external
IP address.
Consider:
* You create a Service with an external load balancer (IP Address 1.2.3.4) and port 80
* You open the firewall for port 80 for all nodes in your cluster, so that the external Service actually can deliver packets to your Service
* You start an nginx server, running on port 80 on the host virtual machine (IP Address 2.3.4.5). This nginx is **also** exposed to the internet on the VM's external IP address.
Consequently, please be careful when opening firewalls in Google Compute Engine or Google Container Engine. You may accidentally be exposing other services to the wilds of the internet.
* You create a Service with an external load balancer (IP Address 1.2.3.4)
and port 80
* You open the firewall for port 80 for all nodes in your cluster, so that
the external Service actually can deliver packets to your Service
* You start an nginx server, running on port 80 on the host virtual machine
(IP Address 2.3.4.5). This nginx is **also** exposed to the internet on
the VM's external IP address.
Consequently, please be careful when opening firewalls in Google Compute Engine
or Google Container Engine. You may accidentally be exposing other services to
the wilds of the internet.
This will be fixed in an upcoming release of Kubernetes.
@@ -201,9 +201,6 @@ Just like the others, we create a service to group the guestbook pods but this t
1. Use the [guestbook-service.json](guestbook-service.json) file to create the guestbook service by running the `kubectl create -f`*`filename`*command: