Refdocs for 1.2 import

This commit is contained in:
John Mulhausen
2016-03-07 16:51:25 +00:00
parent 0a20f23ad9
commit a777a06bb1
69 changed files with 34475 additions and 19307 deletions
+7 -20
View File
@@ -1,7 +1,3 @@
---
layout: docwithnav
title: "kubectl exec"
---
<!-- BEGIN MUNGE: UNVERSIONED_WARNING -->
@@ -17,46 +13,39 @@ Execute a command in a container.
Execute a command in a container.
```
{% raw %}
kubectl exec POD [-c CONTAINER] -- COMMAND [args...]
{% endraw %}
```
### Examples
```
{% raw %}
# Get output from running 'date' from pod 123456-7890, using the first container by default
$ kubectl exec 123456-7890 date
kubectl exec 123456-7890 date
# Get output from running 'date' in ruby-container from pod 123456-7890
$ kubectl exec 123456-7890 -c ruby-container date
kubectl exec 123456-7890 -c ruby-container date
# Switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-780
# Switch to raw terminal mode, sends stdin to 'bash' in ruby-container from pod 123456-7890
# and sends stdout/stderr from 'bash' back to the client
$ kubectl exec 123456-7890 -c ruby-container -i -t -- bash -il
{% endraw %}
kubectl exec 123456-7890 -c ruby-container -i -t -- bash -il
```
### Options
```
{% raw %}
-c, --container="": Container name. If omitted, the first container in the pod will be chosen
-p, --pod="": Pod name
-i, --stdin[=false]: Pass stdin to the container
-t, --tty[=false]: Stdin is a TTY
{% endraw %}
```
### Options inherited from parent commands
```
{% raw %}
--alsologtostderr[=false]: log to standard error as well as files
--api-version="": The API version to use when talking to the server
--certificate-authority="": Path to a cert. file for the certificate authority.
--client-certificate="": Path to a client key file for TLS.
--client-certificate="": Path to a client certificate file for TLS.
--client-key="": Path to a client key file for TLS.
--cluster="": The name of the kubeconfig cluster to use
--context="": The name of the kubeconfig context to use
@@ -76,14 +65,13 @@ $ kubectl exec 123456-7890 -c ruby-container -i -t -- bash -il
--username="": Username for basic authentication to the API server.
--v=0: log level for V logs
--vmodule=: comma-separated list of pattern=N settings for file-filtered logging
{% endraw %}
```
### SEE ALSO
* [kubectl](kubectl.html) - kubectl controls the Kubernetes cluster manager
* [kubectl](kubectl.md) - kubectl controls the Kubernetes cluster manager
###### Auto generated by spf13/cobra at 2015-09-10 18:53:03.156052759 +0000 UTC
###### Auto generated by spf13/cobra on 29-Feb-2016
@@ -95,4 +83,3 @@ $ kubectl exec 123456-7890 -c ruby-container -i -t -- bash -il
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/kubectl/kubectl_exec.md?pixel)]()
<!-- END MUNGE: GENERATED_ANALYTICS -->