mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 03:33:56 +00:00
Use NodePort instead Port, firewalls install firewall.
This commit is contained in:
parent
0f3740501b
commit
3a598eba0e
@ -126,7 +126,7 @@ func printObjectSpecificMessage(obj runtime.Object, out io.Writer) {
|
|||||||
An external load-balanced service was created. On many platforms (e.g. Google Compute Engine),
|
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(s) (%s) to serve traffic.
|
you will also need to explicitly open a Firewall rule for the service port(s) (%s) to serve traffic.
|
||||||
|
|
||||||
See https://github.com/GoogleCloudPlatform/kubernetes/tree/master/docs/services-firewall.md for more details.
|
See https://github.com/GoogleCloudPlatform/kubernetes/tree/master/docs/services-firewalls.md for more details.
|
||||||
`, makePortsString(obj.Spec.Ports))
|
`, makePortsString(obj.Spec.Ports))
|
||||||
out.Write([]byte(msg))
|
out.Write([]byte(msg))
|
||||||
}
|
}
|
||||||
@ -136,7 +136,7 @@ func printObjectSpecificMessage(obj runtime.Object, out io.Writer) {
|
|||||||
If you want to expose this service to the external internet, you may need to set up
|
If you want to expose this service to the external internet, you may need to set up
|
||||||
firewall rules for the service port(s) (%s) to serve traffic.
|
firewall rules for the service port(s) (%s) to serve traffic.
|
||||||
|
|
||||||
See https://github.com/GoogleCloudPlatform/kubernetes/tree/master/docs/services-firewall.md for more details.
|
See https://github.com/GoogleCloudPlatform/kubernetes/tree/master/docs/services-firewalls.md for more details.
|
||||||
`, makePortsString(obj.Spec.Ports))
|
`, makePortsString(obj.Spec.Ports))
|
||||||
out.Write([]byte(msg))
|
out.Write([]byte(msg))
|
||||||
}
|
}
|
||||||
@ -146,7 +146,7 @@ func printObjectSpecificMessage(obj runtime.Object, out io.Writer) {
|
|||||||
func makePortsString(ports []api.ServicePort) string {
|
func makePortsString(ports []api.ServicePort) string {
|
||||||
pieces := make([]string, len(ports))
|
pieces := make([]string, len(ports))
|
||||||
for ix := range ports {
|
for ix := range ports {
|
||||||
pieces[ix] = fmt.Sprintf("%s:%d", strings.ToLower(string(ports[ix].Protocol)), ports[ix].Port)
|
pieces[ix] = fmt.Sprintf("%s:%d", strings.ToLower(string(ports[ix].Protocol)), ports[ix].NodePort)
|
||||||
}
|
}
|
||||||
return strings.Join(pieces, ",")
|
return strings.Join(pieces, ",")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user