Merge pull request #8166 from kargakis/labels-for-object

expose: Re-use labels in case none was specified
This commit is contained in:
Jeff Lowdermilk
2015-05-15 11:35:52 -07:00
7 changed files with 77 additions and 6 deletions

View File

@@ -8,7 +8,8 @@ Take a replicated application and expose it as Kubernetes Service
Take a replicated application and expose it as Kubernetes Service.
Looks up a replication controller or service by name and uses the selector for that resource as the
selector for a new Service on the specified port.
selector for a new Service on the specified port. If no labels are specified, the new service will
re-use the labels from the resource it exposes.
```
kubectl expose RESOURCE NAME --port=port [--protocol=TCP|UDP] [--target-port=number-or-name] [--service-name=name] [--public-ip=ip] [--create-external-load-balancer=bool]
@@ -81,4 +82,4 @@ $ kubectl expose rc streamer --port=4100 --protocol=udp --service-name=video-str
### SEE ALSO
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-05-08 20:26:40.49295951 +0000 UTC
###### Auto generated by spf13/cobra at 2015-05-14 09:05:28.99900833 +0000 UTC

View File

@@ -17,7 +17,8 @@ Take a replicated application and expose it as Kubernetes Service.
.PP
Looks up a replication controller or service by name and uses the selector for that resource as the
selector for a new Service on the specified port.
selector for a new Service on the specified port. If no labels are specified, the new service will
re\-use the labels from the resource it exposes.
.SH OPTIONS