我试图确保在继续另一个 Kubernetes 操作之前删除一个 pod。所以我的想法是调用 Pod 删除函数,然后调用 Pod 获取函数。
// Delete Pod
err := kubeClient.CoreV1().Pods(tr.namespace).Delete(podName, &metav1.DeleteOptions{})
if err != nil {
....
}
pod, err := kubeClient.CoreV1().Pods(tr.namespace).Get(podName, &metav1.DeleteOptions{})
// What do I look for to confirm that the pod has been deleted?