Add messages to indicate that opening an external firewall may be necessary.

This commit is contained in:
Brendan Burns
2015-06-04 20:52:46 -07:00
parent fc80fd6860
commit 380790a8e2
6 changed files with 201 additions and 6 deletions

View File

@@ -201,5 +201,15 @@ 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)
}