mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-03 02:07:38 +00:00
Merge pull request #25253 from soltysh/issue24533
Automatic merge from submit-queue kubectl run --restart=Never creates pods Fixes #24533. @bgrant0607 @janetkuo ptal /fyi @thockin ```release-note * kubectl run --restart=Never creates pods ``` []()
This commit is contained in:
@@ -25,7 +25,7 @@ options:
|
||||
If true, a public, external service is created for the container(s) which are run
|
||||
- name: generator
|
||||
usage: |
|
||||
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.
|
||||
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.
|
||||
- name: hostport
|
||||
default_value: "-1"
|
||||
usage: |
|
||||
@@ -77,7 +77,7 @@ options:
|
||||
- name: restart
|
||||
default_value: Always
|
||||
usage: |
|
||||
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'
|
||||
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'
|
||||
- name: rm
|
||||
default_value: "false"
|
||||
usage: |
|
||||
@@ -197,7 +197,7 @@ example: |-
|
||||
# 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.
|
||||
|
Reference in New Issue
Block a user