mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-08 12:41:58 +00:00
Merge pull request #15921 from brendandburns/fix2
Add a --expose flag to kubectl run
This commit is contained in:
@@ -34,6 +34,10 @@ Creates a replication controller to manage the created container(s).
|
||||
\fB\-\-env\fP=[]
|
||||
Environment variables to set in the container
|
||||
|
||||
.PP
|
||||
\fB\-\-expose\fP=false
|
||||
If true, a public, external service is created for the container(s) which are run
|
||||
|
||||
.PP
|
||||
\fB\-\-generator\fP=""
|
||||
The name of the API generator to use. Default is 'run/v1' if \-\-restart=Always, otherwise the default is 'run\-pod/v1'.
|
||||
@@ -78,7 +82,7 @@ Creates a replication controller to manage the created container(s).
|
||||
|
||||
.PP
|
||||
\fB\-\-port\fP=\-1
|
||||
The port that this container exposes.
|
||||
The port that this container exposes. If \-\-expose is true, this is also the port used by the service that is created.
|
||||
|
||||
.PP
|
||||
\fB\-r\fP, \fB\-\-replicas\fP=1
|
||||
@@ -92,6 +96,14 @@ Creates a replication controller to manage the created container(s).
|
||||
\fB\-\-restart\fP="Always"
|
||||
The restart policy for this Pod. Legal values [Always, OnFailure, Never]. If set to 'Always' a replication controller is created for this pod, if set to OnFailure or Never, only the Pod is created and \-\-replicas must be 1. Default 'Always'
|
||||
|
||||
.PP
|
||||
\fB\-\-service\-generator\fP="service/v2"
|
||||
The name of the generator to use for creating a service. Only used if \-\-expose is true
|
||||
|
||||
.PP
|
||||
\fB\-\-service\-overrides\fP=""
|
||||
An inline JSON override for the generated service object. If this is non\-empty, it is used to override the generated object. Requires that the object supply a valid apiVersion field. Only used if \-\-expose is true.
|
||||
|
||||
.PP
|
||||
\fB\-a\fP, \fB\-\-show\-all\fP=false
|
||||
When printing, show all resources (default hide terminated pods.)
|
||||
|
Reference in New Issue
Block a user