Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

416
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda