CmdID

CmdID / Commands

kubectl-attach

Attach to a process that is already running inside an existing container. tldr-pages

On several platforms

Opens CmdID with your command. It is read in your browser and sent nowhere.

Several platforms

from tldr-pages, CC BY 4.0

Get output from a pod

kubectl attach pod_nameIdentify

Get output from a container in the specified pod

kubectl attach pod_name --container container_nameIdentify
--containerContainer name. kubectl reference

Get output from the first pod of a replica set

kubectl attach [rs/replicaset_nameIdentify

Create an interactive session with a pod

kubectl attach pod_name --stdin --ttyIdentify
--stdinPass stdin to the container kubectl reference
--ttyStdin is a TTY kubectl reference

Create an interactive session with a specific container from a pod

kubectl attach pod_name --container container_name --stdin --ttyIdentify
--containerContainer name. kubectl reference
--stdinPass stdin to the container kubectl reference
--ttyStdin is a TTY kubectl reference