Is there a Kubectl cordon pod? or Kubectl drain Pod?

1,206 views
Skip to first unread message

Gary Denner

unread,
Nov 29, 2016, 7:28:11 AM11/29/16
to Kubernetes developer/contributor discussion
I see it at the node level, but would like a way to isolate a Pod for debugging purposes.

Thanks

Rodrigo Campos

unread,
Nov 29, 2016, 10:07:44 AM11/29/16
to Gary Denner, Kubernetes developer/contributor discussion
On Tue, Nov 29, 2016 at 04:28:11AM -0800, Gary Denner wrote:
> I see it at the node level, but would like a way to isolate a Pod for
> debugging purposes.

Just node selector and deploy? Would that work?

David Aronchick

unread,
Nov 29, 2016, 10:29:13 AM11/29/16
to Rodrigo Campos, Gary Denner, Kubernetes developer/contributor discussion

Isolate it in what way? If, for example, you'd like to remove it from a service, you could remove the label and then the pod would stay up but not be part of the service.

Eg
# remove the label "name" from <pod-name>
Kubectl label pods <pod-name> name-


--
You received this message because you are subscribed to the Google Groups "Kubernetes developer/contributor discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-de...@googlegroups.com.
To post to this group, send email to kuberne...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-dev/20161129150737.GC11502%40sdfg.com.ar.
For more options, visit https://groups.google.com/d/optout.

Tim Hockin

unread,
Nov 29, 2016, 10:30:04 AM11/29/16
to Gary Denner, Kubernetes developer/contributor discussion
Change the labels so it doesn't match Services or RCs any more?

On Nov 29, 2016 4:28 AM, "Gary Denner" <gary....@gmail.com> wrote:
I see it at the node level, but would like a way to isolate a Pod for debugging purposes.

Thanks

--
You received this message because you are subscribed to the Google Groups "Kubernetes developer/contributor discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-dev+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-dev@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubernetes-dev/fcb4eb54-4f58-4085-8c1c-cd0f113ef848%40googlegroups.com.

Gary Denner

unread,
Nov 29, 2016, 10:36:22 AM11/29/16
to Kubernetes developer/contributor discussion
Thanks Tim, yeah that would work.

e.g. 10 pods of each service, 1 of them is OOM errors, I want to isolate that one while we take heap dump and thread dumps and just have traffic going to the other 9 pods.

Tim Hockin

unread,
Nov 29, 2016, 10:56:26 AM11/29/16
to Gary Denner, Kubernetes developer/contributor discussion
This is precisely why pods and services and replication are so loosely
coupled (among other reasons).
> --
> You received this message because you are subscribed to the Google Groups
> "Kubernetes developer/contributor discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to kubernetes-de...@googlegroups.com.
> To post to this group, send email to kuberne...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/kubernetes-dev/ad9eb5a3-ffdc-43d2-8878-618b8a6e50c0%40googlegroups.com.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages