.TH "OPENSHIFT CLI" "1" " Openshift CLI User Manuals" "Openshift" "June 2016" ""
.SH NAME
.PP
openshift cli debug \- Launch a new instance of a pod for debugging
.SH SYNOPSIS
.PP
\fBopenshift cli debug\fP [OPTIONS]
.SH DESCRIPTION
.PP
Launch a command shell to debug a running application
.PP
When debugging images and setup problems, it's useful to get an exact copy of a running pod configuration and troubleshoot with a shell. Since a pod that is failing may not be started and not accessible to 'rsh' or 'exec', the 'debug' command makes it easy to create a carbon copy of that setup.
.PP
The default mode is to start a shell inside of the first container of the referenced pod, replication controller, or deployment config. The started pod will be a copy of your source pod, with labels stripped, the command changed to '/bin/sh', and readiness and liveness checks disabled. If you just want to run a command, add '\-\-' and a command to run. Passing a command will not create a TTY or send STDIN by default. Other flags are supported for altering the container or pod in common ways.
.PP
A common problem running containers is a security policy that prohibits you from running as a root user on the cluster. You can use this command to test running a pod as non\-root (with \-\-as\-user) or to run a non\-root pod as root (with \-\-as\-root).
.PP
The debug pod is deleted when the the remote command completes or the user interrupts the shell.
.SH OPTIONS
.PP
\fB\-\-as\-root\fP=false
Try to run the container as the root user
.PP
\fB\-\-as\-user\fP=\-1
Try to run the container as a specific user UID (note: admins may limit your ability to use this flag)
.PP
\fB\-c\fP, \fB\-\-container\fP=""
Container name; defaults to first container
.PP
\fB\-f\fP, \fB\-\-filename\fP=""
Filename or URL to file to read a template
.PP
\fB\-\-keep\-annotations\fP=false
Keep the original pod annotations
.PP
\fB\-\-keep\-init\-containers\fP=true
Run the init containers for the pod. Defaults to true.
.PP
\fB\-\-keep\-liveness\fP=false
Keep the original pod liveness probes
.PP
\fB\-\-keep\-readiness\fP=false
Keep the original pod readiness probes
.PP
\fB\-I\fP, \fB\-\-no\-stdin\fP=false
Bypasses passing STDIN to the container, defaults to true if no command specified
.PP
\fB\-T\fP, \fB\-\-no\-tty\fP=false
Disable pseudo\-terminal allocation
.PP
\fB\-\-node\-name\fP=""
Set a specific node to run on \- by default the pod will run on any valid node
.PP
\fB\-\-one\-container\fP=false
Run only the selected container, remove all others
.PP
\fB\-o\fP, \fB\-\-output\fP=""
Output format. One of: json|yaml|wide|name|go\-template=...|go\-template\-file=...|jsonpath=...|jsonpath\-file=... See golang template [
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]] and jsonpath template [
\[la]http://kubernetes.io/docs/user-guide/jsonpath/\[ra]].
.PP
\fB\-\-output\-version\fP=""
Output the formatted object with the given version (default api\-version).
.PP
\fB\-\-template\fP=""
Template string or path to template file to use when \-o=go\-template, \-o=go\-template\-file. The template format is golang templates [
\[la]http://golang.org/pkg/text/template/#pkg-overview\[ra]].
.PP
\fB\-t\fP, \fB\-\-tty\fP=false
Force a pseudo\-terminal to be allocated
.SH OPTIONS INHERITED FROM PARENT COMMANDS
.PP
\fB\-\-api\-version\fP=""
DEPRECATED: The API version to use when talking to the server
.PP
\fB\-\-as\fP=""
Username to impersonate for the operation
.PP
\fB\-\-certificate\-authority\fP=""
Path to a cert. file for the certificate authority
.PP
\fB\-\-client\-certificate\fP=""
Path to a client certificate file for TLS
.PP
\fB\-\-client\-key\fP=""
Path to a client key file for TLS
.PP
\fB\-\-cluster\fP=""
The name of the kubeconfig cluster to use
.PP
\fB\-\-config\fP=""
Path to the config file to use for CLI requests.
.PP
\fB\-\-context\fP=""
The name of the kubeconfig context to use
.PP
\fB\-\-google\-json\-key\fP=""
The Google Cloud Platform Service Account JSON Key to use for authentication.
.PP
\fB\-\-insecure\-skip\-tls\-verify\fP=false
If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure
.PP
\fB\-\-log\-flush\-frequency\fP=0
Maximum number of seconds between log flushes
.PP
\fB\-\-match\-server\-version\fP=false
Require server version to match client version
.PP
\fB\-n\fP, \fB\-\-namespace\fP=""
If present, the namespace scope for this CLI request
.PP
\fB\-\-request\-timeout\fP="0"
The length of time to wait before giving up on a single server request. Non\-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests.
.PP
\fB\-\-server\fP=""
The address and port of the Kubernetes API server
.PP
\fB\-\-token\fP=""
Bearer token for authentication to the API server
.PP
\fB\-\-user\fP=""
The name of the kubeconfig user to use
.SH EXAMPLE
.PP
.RS
.nf
# Debug a currently running deployment
openshift cli debug dc/test
# Test running a deployment as a non\-root user
openshift cli debug dc/test \-\-as\-user=1000000
# Debug a specific failing container by running the env command in the 'second' container
openshift cli debug dc/test \-c second \-\- /bin/env
# See the pod that would be created to debug
openshift cli debug dc/test \-o yaml
.fi
.RE
.SH SEE ALSO
.PP
\fBopenshift\-cli(1)\fP,
.SH HISTORY
.PP
June 2016, Ported from the Kubernetes man\-doc generator