kubectl-attach
TLDR
Attach to running container
$ kubectl attach [pod-name]
Attach to specific container in pod$ kubectl attach [pod-name] -c [container-name]
Attach with stdin enabled$ kubectl attach -it [pod-name]
SYNOPSIS
kubectl attach [options] pod-name
DESCRIPTION
kubectl attach attaches to a running container in a pod. Allows interacting with processes already running in the container. Unlike exec, attach connects to the main container process rather than starting a new one.
PARAMETERS
-c, --container name
Container name in multi-container pod.-i, --stdin
Pass stdin to container.-t, --tty
Allocate TTY for container.-n, --namespace name
Kubernetes namespace.
SEE ALSO
kubectl(1), kubectl-exec(1)


