aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugin/kubernetes/controller.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugin/kubernetes/controller.go b/plugin/kubernetes/controller.go
index b809264e1..fa2e749bb 100644
--- a/plugin/kubernetes/controller.go
+++ b/plugin/kubernetes/controller.go
@@ -368,6 +368,9 @@ func (dns *dnsControl) ServiceList() []*api.Service {
}
func (dns *dnsControl) PodIndex(ip string) []interface{} {
+ if dns.podLister.Indexer == nil {
+ return nil
+ }
pods, err := dns.podLister.Indexer.ByIndex(podIPIndex, ip)
if err != nil {
return nil