Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference Documentation for kubectl Commands for 1.17 #18017

Merged
merged 1 commit into from
Dec 9, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 31 additions & 75 deletions static/docs/reference/generated/kubectl/kubectl-commands.html
Original file line number Diff line number Diff line change
Expand Up @@ -2016,12 +2016,6 @@ <h3 id="flags">Flags</h3>
<td>If the requested object does not exist the command will return exit code 0. </td>
</tr>
<tr>
<td>include-uninitialized</td>
<td></td>
<td>false</td>
<td>If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., &quot;--all&quot;. Objects with empty metadata.initializers are regarded as initialized. </td>
</tr>
<tr>
<td>kustomize</td>
<td>k</td>
<td></td>
Expand Down Expand Up @@ -2670,7 +2664,7 @@ <h1 id="delete">delete</h1>
</code></pre>
<p>Delete resources by filenames, stdin, resources and names, or by resources and label selector.</p>
<p> JSON and YAML formats are accepted. Only one type of the arguments may be specified: filenames, resources and names, or resources and label selector.</p>
<p> Some resources, such as pods, support graceful deletion. These resources define a default period before they are forcibly terminated (the grace period) but you may override that value with the --grace-period flag, or pass --now to set a grace-period of 1. Because these resources often represent entities in the cluster, deletion may not be acknowledged immediately. If the node hosting a pod is down or cannot reach the API server, termination may take significantly longer than the grace period. To force delete a resource, you must pass a grace period of 0 and specify the --force flag.</p>
<p> Some resources, such as pods, support graceful deletion. These resources define a default period before they are forcibly terminated (the grace period) but you may override that value with the --grace-period flag, or pass --now to set a grace-period of 1. Because these resources often represent entities in the cluster, deletion may not be acknowledged immediately. If the node hosting a pod is down or cannot reach the API server, termination may take significantly longer than the grace period. To force delete a resource, you must pass a grace period of 0 and specify the --force flag. Note: only a subset of resources support graceful deletion. In absence of the support, --grace-period is ignored.</p>
<p> IMPORTANT: Force deleting pods does not wait for confirmation that the pod&#39;s processes have been terminated, which can leave those processes running until the node detects the deletion and completes graceful deletion. If your processes use shared storage or talk to a remote API and depend on the name of the pod to identify themselves, force deleting those pods may result in multiple processes running on different machines using the same identification which may lead to data corruption or inconsistency. Only force delete pods when you are sure the pod is terminated, or if your application can tolerate multiple copies of the same pod running at once. Also, if you force delete pods the scheduler may place new pods on those nodes before the node has released those resources and causing those pods to be evicted immediately.</p>
<p> Note that the delete command does NOT do resource version checks, so if someone submits an update to a resource right when you submit a delete, their update will be lost along with the rest of the resource.</p>
<h3 id="usage">Usage</h3>
Expand Down Expand Up @@ -2735,12 +2729,6 @@ <h3 id="flags">Flags</h3>
<td>Treat &quot;resource not found&quot; as a successful delete. Defaults to &quot;true&quot; when --all is specified. </td>
</tr>
<tr>
<td>include-uninitialized</td>
<td></td>
<td>false</td>
<td>If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., &quot;--all&quot;. Objects with empty metadata.initializers are regarded as initialized. </td>
</tr>
<tr>
<td>kustomize</td>
<td>k</td>
<td></td>
Expand Down Expand Up @@ -2891,12 +2879,6 @@ <h3 id="flags">Flags</h3>
<td>Period of time in seconds given to the resource to terminate gracefully. Ignored if negative. Set to 1 for immediate shutdown. Can only be set to 0 when --force is true (force deletion). </td>
</tr>
<tr>
<td>include-uninitialized</td>
<td></td>
<td>false</td>
<td>If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., &quot;--all&quot;. Objects with empty metadata.initializers are regarded as initialized. </td>
</tr>
<tr>
<td>kustomize</td>
<td>k</td>
<td></td>
Expand Down Expand Up @@ -3031,12 +3013,6 @@ <h3 id="flags">Flags</h3>
<td>Filename, directory, or URL to files to use to edit the resource </td>
</tr>
<tr>
<td>include-uninitialized</td>
<td></td>
<td>false</td>
<td>If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., &quot;--all&quot;. Objects with empty metadata.initializers are regarded as initialized. </td>
</tr>
<tr>
<td>kustomize</td>
<td>k</td>
<td></td>
Expand Down Expand Up @@ -3288,12 +3264,6 @@ <h3 id="flags">Flags</h3>
<td>Filename, directory, or URL to files identifying the resource to update the annotation </td>
</tr>
<tr>
<td>include-uninitialized</td>
<td></td>
<td>false</td>
<td>If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., &quot;--all&quot;. Objects with empty metadata.initializers are regarded as initialized. </td>
</tr>
<tr>
<td>kustomize</td>
<td>k</td>
<td></td>
Expand Down Expand Up @@ -3565,7 +3535,7 @@ <h1 id="diff">diff</h1>
</code></pre>
<p>Diff configurations specified by filename or stdin between the current online configuration, and the configuration as it would be if applied.</p>
<p> Output is always YAML.</p>
<p> KUBECTL_EXTERNAL_DIFF environment variable can be used to select your own diff command. By default, the &quot;diff&quot; command available in your path will be run with &quot;-u&quot; (unicode) and &quot;-N&quot; (treat new files as empty) options.</p>
<p> KUBECTL_EXTERNAL_DIFF environment variable can be used to select your own diff command. By default, the &quot;diff&quot; command available in your path will be run with &quot;-u&quot; (unified diff) and &quot;-N&quot; (treat absent files as empty) options.</p>
<h3 id="usage">Usage</h3>
<p><code>$ diff -f FILENAME</code></p>
<h3 id="flags">Flags</h3>
Expand Down Expand Up @@ -3671,12 +3641,6 @@ <h3 id="flags">Flags</h3>
<td>Filename, directory, or URL to files to use to edit the resource </td>
</tr>
<tr>
<td>include-uninitialized</td>
<td></td>
<td>false</td>
<td>If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., &quot;--all&quot;. Objects with empty metadata.initializers are regarded as initialized. </td>
</tr>
<tr>
<td>kustomize</td>
<td>k</td>
<td></td>
Expand Down Expand Up @@ -3815,12 +3779,6 @@ <h3 id="flags">Flags</h3>
<td>Filename, directory, or URL to files identifying the resource to update the labels </td>
</tr>
<tr>
<td>include-uninitialized</td>
<td></td>
<td>false</td>
<td>If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., &quot;--all&quot;. Objects with empty metadata.initializers are regarded as initialized. </td>
</tr>
<tr>
<td>kustomize</td>
<td>k</td>
<td></td>
Expand Down Expand Up @@ -4910,12 +4868,6 @@ <h3 id="flags">Flags</h3>
<td>Filename, directory, or URL to files identifying the resource to get from a server. </td>
</tr>
<tr>
<td>include-uninitialized</td>
<td></td>
<td>false</td>
<td>If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., &quot;--all&quot;. Objects with empty metadata.initializers are regarded as initialized. </td>
</tr>
<tr>
<td>kustomize</td>
<td>k</td>
<td></td>
Expand Down Expand Up @@ -5028,12 +4980,6 @@ <h3 id="flags">Flags</h3>
<td>Filename, directory, or URL to files identifying the resource to get from a server. </td>
</tr>
<tr>
<td>include-uninitialized</td>
<td></td>
<td>false</td>
<td>If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., &quot;--all&quot;. Objects with empty metadata.initializers are regarded as initialized. </td>
</tr>
<tr>
<td>kustomize</td>
<td>k</td>
<td></td>
Expand Down Expand Up @@ -5227,12 +5173,6 @@ <h3 id="flags">Flags</h3>
<td>Filename, directory, or URL to files identifying the resource to get from a server. </td>
</tr>
<tr>
<td>include-uninitialized</td>
<td></td>
<td>false</td>
<td>If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., &quot;--all&quot;. Objects with empty metadata.initializers are regarded as initialized. </td>
</tr>
<tr>
<td>kustomize</td>
<td>k</td>
<td></td>
Expand Down Expand Up @@ -5332,12 +5272,6 @@ <h3 id="flags">Flags</h3>
<td>Groups to bind to the role </td>
</tr>
<tr>
<td>include-uninitialized</td>
<td></td>
<td>false</td>
<td>If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., &quot;--all&quot;. Objects with empty metadata.initializers are regarded as initialized. </td>
</tr>
<tr>
<td>kustomize</td>
<td>k</td>
<td></td>
Expand Down Expand Up @@ -5848,12 +5782,6 @@ <h3 id="flags">Flags</h3>
<td>Filename, directory, or URL to files containing the resource to describe </td>
</tr>
<tr>
<td>include-uninitialized</td>
<td></td>
<td>false</td>
<td>If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., &quot;--all&quot;. Objects with empty metadata.initializers are regarded as initialized. </td>
</tr>
<tr>
<td>kustomize</td>
<td>k</td>
<td></td>
Expand Down Expand Up @@ -5994,6 +5922,11 @@ <h1 id="logs">logs</h1>
<pre class="code-block example"><code class="lang-shell">kubectl logs <span class="hljs-attribute">--since</span>=1h nginx
</code></pre>
<blockquote class="code-block example">
<p> Show logs from a kubelet with an expired serving certificate</p>
</blockquote>
<pre class="code-block example"><code class="lang-shell">kubectl logs <span class="hljs-comment">--insecure-skip-tls-verify-backend nginx</span>
</code></pre>
<blockquote class="code-block example">
<p> Return snapshot logs from first container of a job named hello</p>
</blockquote>
<pre class="code-block example"><code class="lang-shell">kubectl logs <span class="hljs-keyword">job</span>/hello
Expand Down Expand Up @@ -6042,6 +5975,12 @@ <h3 id="flags">Flags</h3>
<td>If watching / following pod logs, allow for any errors that occur to be non-fatal </td>
</tr>
<tr>
<td>insecure-skip-tls-verify-backend</td>
<td></td>
<td>false</td>
<td>Skip verifying the identity of the kubelet that logs are requested from. In theory, an attacker could provide invalid log content back. You might want to use this if your kubelet serving certificates have expired. </td>
</tr>
<tr>
<td>limit-bytes</td>
<td></td>
<td>0</td>
Expand All @@ -6060,6 +5999,12 @@ <h3 id="flags">Flags</h3>
<td>The length of time (like 5s, 2m, or 3h, higher than zero) to wait until at least one pod is running </td>
</tr>
<tr>
<td>prefix</td>
<td></td>
<td>false</td>
<td>Prefix each log line with the log source (pod name and container name) </td>
</tr>
<tr>
<td>previous</td>
<td>p</td>
<td>false</td>
Expand Down Expand Up @@ -6288,7 +6233,7 @@ <h3 id="flags">Flags</h3>
<h1 id="top">top</h1>
<p>Display Resource (CPU/Memory/Storage) usage.</p>
<p> The top command allows you to see the resource consumption for nodes or pods.</p>
<p> This command requires Heapster to be correctly configured and working on the server.</p>
<p> This command requires Metrics Server to be correctly configured and working on the server.</p>
<h3 id="usage">Usage</h3>
<p><code>$ top</code></p>
<hr>
Expand Down Expand Up @@ -6948,6 +6893,11 @@ <h1 id="api-resources">api-resources</h1>
<pre class="code-block example"><code class="lang-shell"><span class="hljs-attribute">kubectl api-resources -o wide</span>
</code></pre>
<blockquote class="code-block example">
<p> Print the supported API Resources sorted by a column</p>
</blockquote>
<pre class="code-block example"><code class="lang-shell">kubectl api-<span class="hljs-built_in">resources</span> --<span class="hljs-built_in">sort</span>-by=<span class="hljs-built_in">name</span>
</code></pre>
<blockquote class="code-block example">
<p> Print the supported namespaced resources</p>
</blockquote>
<pre class="code-block example"><code class="lang-shell"><span class="hljs-attribute">kubectl</span> api-resources --namespaced=<span class="hljs-literal">true</span>
Expand Down Expand Up @@ -7007,6 +6957,12 @@ <h3 id="flags">Flags</h3>
<td>Output format. One of: wide&#124;name. </td>
</tr>
<tr>
<td>sort-by</td>
<td></td>
<td></td>
<td>If non-empty, sort nodes list using specified field. The field can be either &#39;name&#39; or &#39;kind&#39;. </td>
</tr>
<tr>
<td>verbs</td>
<td></td>
<td>[]</td>
Expand Down