Skip to content
Advertisement

Kubernetes python client equivalent of “kubectl wait –for ” command

I am using kubernetes-client/python and want to write a method which will block control until a set of Pods is in Ready state (Running state). I found that kubernetes supports wait –for command for doing same thing via command. Can someone please help me with how to achieve same functionality using kubernetes python client.

To be precise i am mostly interested in equivalent of-

JavaScript

Advertisement

Answer

You can use the watch functionality available in the client library.

JavaScript
Advertisement