kubectl-attach
Attach to a process that is already running inside an existing container. tldr-pages
On several platforms
Several platforms
Get output from a pod
kubectl attach pod_nameIdentifyGet output from a container in the specified pod
kubectl attach pod_name --container container_nameIdentify--containerContainer name. kubectl referenceGet output from the first pod of a replica set
kubectl attach [rs/replicaset_nameIdentifyCreate an interactive session with a pod
kubectl attach pod_name --stdin --ttyIdentify--stdinPass stdin to the container kubectl reference--ttyStdin is a TTY kubectl referenceCreate 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