Alias --container-port to --target-port in kubectl

This commit is contained in:
Tim Hockin
2015-03-26 13:56:36 -07:00
parent 13ae40681a
commit f928f52a4a
3 changed files with 17 additions and 11 deletions

View File

@@ -23,7 +23,7 @@ selector for a new Service on the specified port.
.SH OPTIONS
.PP
\fB\-\-container\-port\fP=""
Name or number for the port on the container that the service should direct traffic to. Optional.
Synonym for \-\-target\-port
.PP
\fB\-\-create\-external\-load\-balancer\fP=false
@@ -81,6 +81,10 @@ selector for a new Service on the specified port.
\fB\-\-service\-name\fP=""
The name for the newly created service.
.PP
\fB\-\-target\-port\fP=""
Name or number for the port on the container that the service should direct traffic to. Optional.
.PP
\fB\-t\fP, \fB\-\-template\fP=""
Template string or path to template file to use when \-o=template or \-o=templatefile. The template format is golang templates [
@@ -195,10 +199,10 @@ selector for a new Service on the specified port.
.nf
// Creates a service for a replicated nginx, which serves on port 80 and connects to the containers on port 8000.
$ kubectl expose nginx \-\-port=80 \-\-container\-port=8000
$ kubectl expose nginx \-\-port=80 \-\-target\-port=8000
// Creates a second service based on the above service, exposing the container port 8443 as port 443 with the name "nginx\-https"
$ kubectl expose service nginx \-\-port=443 \-\-container\-port=8443 \-\-service\-name=nginx\-https
$ kubectl expose service nginx \-\-port=443 \-\-target\-port=8443 \-\-service\-name=nginx\-https
// Create a service for a replicated streaming application on port 4100 balancing UDP traffic and named 'video\-stream'.
$ kubectl expose streamer \-\-port=4100 \-\-protocol=udp \-\-service\-name=video\-stream