Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

411
Views
kubernetes : How to deattach from an attached pod

I have a running pod and I use kubectl attach -ti mypod to give him input.

But then, I would like to "deattach" from my pod and return back to my terminal without terminating my pod. How can I do that?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

From the kubernetes docs:

To detach from the container, you can type the escape sequence Ctrl+P followed by Ctrl+Q.


Update:

Based on feedback from @Abdelghani:

For the record, this does not work if tty is set to false in the container. I didnt find another way to detach other than killing the pod/container.

over 4 years ago · Santiago Trujillo Report

0

You can kill the kubectl attach -it .. process without killing the pod:

host$ kubectl attach -it podname
pod$ do something in pod

Open the other terminal and find your kubectl attach command and then kill it, something like:

host$ ps x | grep "kubectl attach"
> 1234 pts/22   Sl+    0:00 kubectl attach -it podname
host$ kill 1234
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!