Closed
Description
Edited by @mbohlool:
This question lead to an action item to add a retry mechanism to watch class. It should be controlled by a flag and will result in keeping the watch open all the time.
Original post:
below is how i use the client-python in list.py:
config.load_kube_config()
v1 = client.CoreV1Api()
w = watch.Watch()
for event in w.stream(v1.list_persistent_volume_claim_for_all_namespaces):
print("Event: %s %s" % (event['type'], event['object'].metadata.name))
when i run the script with command "python list.py", it will show the event normally,
however i will exited automatic in several minitues.
does anybody konws how could i keep this watch action working all the time?