mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-05 19:21:37 +00:00
kubectl run --restart=Never creates pods
This commit is contained in:
@@ -67,7 +67,7 @@ kubectl run nginx --image=nginx --dry-run
|
||||
# Start a single instance of nginx, but overload the spec of the deployment with a partial set of values parsed from JSON.
|
||||
kubectl run nginx --image=nginx --overrides='{ "apiVersion": "v1", "spec": { ... } }'
|
||||
|
||||
# Start a single instance of busybox and keep it in the foreground, don't restart it if it exits.
|
||||
# Start a pod of busybox and keep it in the foreground, don't restart it if it exits.
|
||||
kubectl run -i -t busybox --image=busybox --restart=Never
|
||||
|
||||
# Start the nginx container using the default command, but use custom arguments (arg1 .. argN) for that command.
|
||||
@@ -88,7 +88,7 @@ kubectl run pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'print
|
||||
--dry-run[=false]: If true, only print the object that would be sent, without sending it.
|
||||
--env=[]: Environment variables to set in the container
|
||||
--expose[=false]: If true, a public, external service is created for the container(s) which are run
|
||||
--generator="": The name of the API generator to use. Default is 'deployment/v1beta1' if --restart=Always, otherwise the default is 'job/v1'. This will happen only for cluster version at least 1.2, for olders we will fallback to 'run/v1' for --restart=Always, 'run-pod/v1' for others.
|
||||
--generator="": The name of the API generator to use. Default is 'deployment/v1beta1' if --restart=Always, 'job/v1' for OnFailure and 'run-pod/v1' for Never. This will happen only for cluster version at least 1.3, for 1.2 we will fallback to 'deployment/v1beta1' for --restart=Always, 'job/v1' for others, for olders we will fallback to 'run/v1' for --restart=Always, 'run-pod/v1' for others.
|
||||
--hostport=-1: The host port mapping for the container port. To demonstrate a single-machine container.
|
||||
--image="": The image for the container to run.
|
||||
--include-extended-apis[=true]: If true, include definitions of new APIs via calls to the API server. [default true]
|
||||
@@ -103,7 +103,7 @@ kubectl run pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'print
|
||||
--record[=false]: Record current kubectl command in the resource annotation.
|
||||
-r, --replicas=1: Number of replicas to create for this container. Default is 1.
|
||||
--requests="": The resource requirement requests for this container. For example, 'cpu=100m,memory=256Mi'. Note that server side components may assign requests depending on the server configuration, such as limit ranges.
|
||||
--restart="Always": The restart policy for this Pod. Legal values [Always, OnFailure, Never]. If set to 'Always' a deployment is created for this pod, if set to OnFailure or Never, a job is created for this pod and --replicas must be 1. Default 'Always'
|
||||
--restart="Always": The restart policy for this Pod. Legal values [Always, OnFailure, Never]. If set to 'Always' a deployment is created for this pod, if set to 'OnFailure', a job is created for this pod, if set to 'Never', a regular pod is created. For the latter two --replicas must be 1. Default 'Always'
|
||||
--rm[=false]: If true, delete resources created in this command for attached containers.
|
||||
--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.
|
||||
--service-generator="service/v2": The name of the generator to use for creating a service. Only used if --expose is true
|
||||
@@ -148,7 +148,7 @@ kubectl run pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'print
|
||||
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 22-Apr-2016
|
||||
###### Auto generated by spf13/cobra on 28-May-2016
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
Reference in New Issue
Block a user