When job-wait is executed immediately after job-create, the core_v1.list_namespaced_pod() function sometimes returns an empty array, it cause an IndexError when accessing pod_list.items[0]. I think this is due to the delay between job creation and pod creation.
In this case the pod should be considered not ready. So it have to wait for the pod to be ready. But the script terminates without error handling. (rel https://github.com/rundeck-plugins/kubernetes/blob/master/contents/job-wait.py#L68)
So i made PR fixing this problem, could you please review it? (PR #155)