⎈ k8s knowledge compiler

kubectl create deployment [page]deterministic

Create a deployment with the specified name

reference

##

Create a deployment with the specified name.

``` kubectl create deployment NAME --image=image -- [COMMAND] [args...] ```

##

``` # Create a deployment named my-dep that runs the busybox image kubectl create deployment my-dep --image=busybox # Create a deployment with a command kubectl create deployment my-dep --image=busybox -- date # Create a deployment named my-dep that runs the nginx image with 3 replicas kubectl create deployment my-dep --image=nginx --replicas=3 # Create a deployment named my-dep that runs the busybox image and expose port 5701 kubectl create deployment my-dep --image=busybox --port=5701 # Create a deployment named my-dep that runs multiple containers kubectl create deployment my-dep --image=busybox:latest --image=ubuntu:latest --image=nginx ```

##

<table style="width: 100%; table-layout: fixed;"> <colgroup> <col span="1" style="width: 10px;" /> <col span="1" /> </colgroup> <tbody>

<tr> <td colspan="2">--allow-missing-template-keys&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default: true</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats.</p></td> </tr>

<tr> <td colspan="2">--dry-run string[="unchanged"]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default: "none"</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>Must be &quot;none&quot;, &quot;server&quot;, or &quot;client&quot;. If client strategy, only print the object that would be sent, without sending it. If server strategy, submit server-side request without persisting the resource.</p></td> </tr>

<tr> <td colspan="2">--field-manager string&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default: "kubectl-create"</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>Name of the manager used to track field ownership.</p></td> </tr>

<tr> <td colspan="2">-h, --help</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>help for deployment</p></td> </tr>

<tr> <td colspan="2">--image strings</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>Image names to run. A deployment can have multiple images set for multi-container pod.</p></td> </tr>

<tr> <td colspan="2">-o, --output string</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>Output format. One of: (json, yaml, kyaml, name, go-template, go-template-file, template, templatefile, jsonpath, jsonpath-as-json, jsonpath-file).</p></td> </tr>

<tr> <td colspan="2">--port int32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default: -1</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>The containerPort that this deployment exposes.</p></td> </tr>

<tr> <td colspan="2">-r, --replicas int32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Default: 1</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>Number of replicas to create. Default is 1.</p></td> </tr>

<tr> <td colspan="2">--save-config</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>If true, the configuration of current object will be saved in its annotation. Otherwise, the annotation will be unchanged. This flag is useful when you want to perform kubectl apply on this object in the future.</p></td> </tr>

<tr> <td colspan="2">--show-managed-fields</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>If true, keep the managedFields when printing objects in JSON or YAML format.</p></td> </tr>

<tr> <td colspan="2">--template string</td> </tr> <tr> <td></td><td style="line-height: 130%; word-wrap: break-word;"><p>Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].</p></td> </tr>

<tr> <td colspan="2">--validate st …(trimmed)

Sources

reference/kubectl/generated/kubectl_create/kubectl_create_deployment.md · dockubectl create deployment

Related (6)

part_of {{% heading "synopsis" %}}describes conf=1
part_of {{% heading "examples" %}}describes conf=1
part_of {{% heading "options" %}}describes conf=1
part_of {{% heading "parentoptions" %}}describes conf=1
part_of {{% heading "seealso" %}}describes conf=1
api_for Deploymentdocuments API object conf=1

← all Docs