aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugin/kubernetes/kubernetes.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugin/kubernetes/kubernetes.go b/plugin/kubernetes/kubernetes.go
index 34dd47254..da1625c54 100644
--- a/plugin/kubernetes/kubernetes.go
+++ b/plugin/kubernetes/kubernetes.go
@@ -351,6 +351,11 @@ func (k *Kubernetes) findPods(r recordRequest, zone string) (pods []msg.Service,
continue
}
+ // exclude pods in the process of termination
+ if !p.ObjectMeta.DeletionTimestamp.IsZero() {
+ continue
+ }
+
// check for matching ip and namespace
if ip == p.Status.PodIP && match(namespace, p.Namespace) {
s := msg.Service{Key: strings.Join([]string{zonePath, Pod, namespace, podname}, "/"), Host: ip, TTL: k.ttl}