@@ -13,13 +13,15 @@ kubectl expose \- Take a replication controller, service or pod and expose it as
...
@@ -13,13 +13,15 @@ kubectl expose \- Take a replication controller, service or pod and expose it as
.SH DESCRIPTION
.SH DESCRIPTION
.PP
.PP
Take a replication controller, service, or pod and expose it as a new Kubernetes service.
Take a replication controller, service, replica set or pod and expose it as a new Kubernetes service.
.PP
.PP
Looks up a replication controller, service, or pod by name and uses the selector for that resource as the
Looks up a replication controller, service, replica set or pod by name and uses the selector for that
selector for a new service on the specified port. Note that if no port is specified via \-\-port and the
resource as the selector for a new service on the specified port. A replica set will be exposed as a
exposed resource has multiple ports, all will be re\-used by the new service. Also if no labels are specified,
service only if it's selector is convertible to a selector that service supports, i.e. when the
the new service will re\-use the labels from the resource it exposes.
replica set selector contains only the matchLabels component. Note that if no port is specified
via \-\-port and the exposed resource has multiple ports, all will be re\-used by the new service. Also
if no labels are specified, the new service will re\-use the labels from the resource it exposes.
.SH OPTIONS
.SH OPTIONS
...
@@ -95,7 +97,7 @@ the new service will re\-use the labels from the resource it exposes.
...
@@ -95,7 +97,7 @@ the new service will re\-use the labels from the resource it exposes.
.PP
.PP
\fB\-\-selector\fP=""
\fB\-\-selector\fP=""
A label selector to use for this service. If empty (the default) infer the selector from the replication controller.
A label selector to use for this service. Only equality\-based selector requirements are supported. If empty (the default) infer the selector from the replication controller or replica set.
--protocol="TCP": The network protocol for the service to be created. Default is 'tcp'.
--protocol="TCP": The network protocol for the service to be created. Default is 'tcp'.
--record[=false]: Record current kubectl command in the resource annotation.
--record[=false]: Record current kubectl command in the resource annotation.
--save-config[=false]: If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
--save-config[=false]: If true, the configuration of current object will be saved in its annotation. This is useful when you want to perform kubectl apply on this object in the future.
--selector="": A label selector to use for this service. If empty (the default) infer the selector from the replication controller.
--selector="": A label selector to use for this service. Only equality-based selector requirements are supported. If empty (the default) infer the selector from the replication controller or replica set.
--session-affinity="": If non-empty, set the session affinity for the service to this; legal values: 'None', 'ClientIP'
--session-affinity="": If non-empty, set the session affinity for the service to this; legal values: 'None', 'ClientIP'
-a, --show-all[=false]: When printing, show all resources (default hide terminated pods.)
-a, --show-all[=false]: When printing, show all resources (default hide terminated pods.)
--show-labels[=false]: When printing, show all labels as the last column (default hide labels column)
--show-labels[=false]: When printing, show all labels as the last column (default hide labels column)
cmd.Flags().Bool("create-external-load-balancer",false,"If true, create an external load balancer for this service (trumped by --type). Implementation is cloud provider dependent. Default is 'false'.")
cmd.Flags().Bool("create-external-load-balancer",false,"If true, create an external load balancer for this service (trumped by --type). Implementation is cloud provider dependent. Default is 'false'.")
cmd.Flags().String("load-balancer-ip","","IP to assign to to the Load Balancer. If empty, an ephemeral IP will be created and used (cloud-provider specific).")
cmd.Flags().String("load-balancer-ip","","IP to assign to to the Load Balancer. If empty, an ephemeral IP will be created and used (cloud-provider specific).")
cmd.Flags().String("selector","","A label selector to use for this service. If empty (the default) infer the selector from the replication controller.")
cmd.Flags().String("selector","","A label selector to use for this service. Only equality-based selector requirements are supported. If empty (the default) infer the selector from the replication controller or replica set.")
cmd.Flags().StringP("labels","l","","Labels to apply to the service created by this call.")
cmd.Flags().StringP("labels","l","","Labels to apply to the service created by this call.")
cmd.Flags().Bool("dry-run",false,"If true, only print the object that would be sent, without creating it.")
cmd.Flags().Bool("dry-run",false,"If true, only print the object that would be sent, without creating it.")
cmd.Flags().String("container-port","","Synonym for --target-port")
cmd.Flags().String("container-port","","Synonym for --target-port")