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-
kubectl wait --for condition=Ready pod -l 'app in (kafka,elasticsearch)'
You can use the
watch
functionality available in the client library.