mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 05:36:12 +00:00
Make deployment the default in kubectl run
This commit is contained in:
@@ -39,7 +39,6 @@ Documentation for other releases can be found at
|
||||
|
||||
- [Deployments](#deployments)
|
||||
- [What is a _Deployment_?](#what-is-a-deployment)
|
||||
- [Enabling Deployments on a Kubernetes cluster](#enabling-deployments-on-a-kubernetes-cluster)
|
||||
- [Creating a Deployment](#creating-a-deployment)
|
||||
- [Updating a Deployment](#updating-a-deployment)
|
||||
- [Multiple Updates](#multiple-updates)
|
||||
|
@@ -40,7 +40,7 @@ Run a particular image on the cluster.
|
||||
|
||||
|
||||
Create and run a particular image, possibly replicated.
|
||||
Creates a replication controller or job to manage the created container(s).
|
||||
Creates a deployment or job to manage the created container(s).
|
||||
|
||||
```
|
||||
kubectl run NAME --image=image [--env="key=value"] [--port=port] [--replicas=replicas] [--dry-run=bool] [--overrides=inline-json] [--command] -- [COMMAND] [args...]
|
||||
@@ -64,7 +64,7 @@ $ kubectl run nginx --image=nginx --replicas=5
|
||||
# Dry run. Print the corresponding API objects without creating them.
|
||||
$ kubectl run nginx --image=nginx --dry-run
|
||||
|
||||
# Start a single instance of nginx, but overload the spec of the replication controller with a partial set of values parsed from JSON.
|
||||
# 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.
|
||||
@@ -88,7 +88,7 @@ $ kubectl run pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'pri
|
||||
--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 'run/v1' if --restart=Always, otherwise the default is 'job/v1beta1'.
|
||||
--generator="": The name of the API generator to use. Default is 'deployment/v1beta1' if --restart=Always, otherwise the default is 'job/v1beta1'.
|
||||
--hostport=-1: The host port mapping for the container port. To demonstrate a single-machine container.
|
||||
--image="": The image for the container to run.
|
||||
-l, --labels="": Labels to apply to the pod(s).
|
||||
@@ -102,7 +102,7 @@ $ kubectl run pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'pri
|
||||
--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'
|
||||
--restart="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, 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 or Never, a job is created for this pod and --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
|
||||
@@ -147,7 +147,7 @@ $ kubectl run pi --image=perl --restart=OnFailure -- perl -Mbignum=bpi -wle 'pri
|
||||
|
||||
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
|
||||
|
||||
###### Auto generated by spf13/cobra on 22-Jan-2016
|
||||
###### Auto generated by spf13/cobra on 2-Feb-2016
|
||||
|
||||
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
||||
[]()
|
||||
|
Reference in New Issue
Block a user