Automatically open a firewall when creating a GCE load balancer.

This commit is contained in:
Brendan Burns
2015-07-08 22:02:10 -07:00
parent 869df32d00
commit a8f02e5472
6 changed files with 102 additions and 12 deletions

View File

@@ -201,15 +201,5 @@ func RunExpose(f *cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []str
}
}
if cmdutil.GetFlagBool(cmd, "create-external-load-balancer") {
msg := fmt.Sprintf(`
An external load-balanced service was created. On many platforms (e.g. Google Compute Engine),
you will also need to explicitly open a firewall rule for the service port (%d) to serve traffic.
See https://github.com/GoogleCloudPlatform/kubernetes/tree/master/docs/services-firewall.md for more details.
`, cmdutil.GetFlagInt(cmd, "port"))
out.Write([]byte(msg))
}
return f.PrintObject(cmd, object, out)
}