Skip to content

Instantly share code, notes, and snippets.

@jbw976 jbw976/kube-dns logs Secret
Created Jan 5, 2017

Embed
What would you like to do?
> kubectl get pods --namespace=kube-system
NAME READY STATUS RESTARTS AGE
heapster-v1.2.0-4088228293-44d1h 2/2 Running 0 28m
kube-apiserver-172.17.4.101 1/1 Running 0 28m
kube-controller-manager-172.17.4.101 1/1 Running 0 28m
kube-dns-782804071-c6lv5 4/4 Running 0 28m
kube-dns-autoscaler-2715466192-z76xg 1/1 Running 0 28m
kube-proxy-172.17.4.101 1/1 Running 0 28m
kube-proxy-172.17.4.201 1/1 Running 0 28m
kube-scheduler-172.17.4.101 1/1 Running 0 27m
kubernetes-dashboard-3543765157-qdrl5 1/1 Running 0 28m
# list all containers in the kube-dns pod
for c in `kubectl get pods --namespace=kube-system -l k8s-app=kube-dns -o jsonpath={.items[*].spec.containers[*].name}`; do echo ${c}; done
kubedns
dnsmasq
dnsmasq-metrics
healthz
# print logs for each container of the kube-dns pod
> for c in `kubectl get pods --namespace=kube-system -l k8s-app=kube-dns -o jsonpath={.items[*].spec.containers[*].name}`; do echo -e "******* ${c} *******\n"; kubectl logs --namespace=kube-system --since 10h kube-dns-782804071-c6lv5 -c ${c}; echo ""; done
******* kubedns *******
I0105 19:08:47.569566 1 dns.go:42] version: v1.6.0-alpha.0.680+3872cb93abf948-dirty
I0105 19:08:47.570041 1 server.go:107] Using https://10.3.0.1:443 for kubernetes master, kubernetes API: <nil>
I0105 19:08:47.570359 1 server.go:68] Using configuration read from ConfigMap: kube-system:kube-dns
I0105 19:08:47.570397 1 server.go:113] FLAG: --alsologtostderr="false"
I0105 19:08:47.570414 1 server.go:113] FLAG: --config-map="kube-dns"
I0105 19:08:47.570425 1 server.go:113] FLAG: --config-map-namespace="kube-system"
I0105 19:08:47.570438 1 server.go:113] FLAG: --dns-bind-address="0.0.0.0"
I0105 19:08:47.570447 1 server.go:113] FLAG: --dns-port="10053"
I0105 19:08:47.570458 1 server.go:113] FLAG: --domain="cluster.local."
I0105 19:08:47.570469 1 server.go:113] FLAG: --federations=""
I0105 19:08:47.570479 1 server.go:113] FLAG: --healthz-port="8081"
I0105 19:08:47.570488 1 server.go:113] FLAG: --kube-master-url=""
I0105 19:08:47.570504 1 server.go:113] FLAG: --kubecfg-file=""
I0105 19:08:47.570522 1 server.go:113] FLAG: --log-backtrace-at=":0"
I0105 19:08:47.570533 1 server.go:113] FLAG: --log-dir=""
I0105 19:08:47.570543 1 server.go:113] FLAG: --log-flush-frequency="5s"
I0105 19:08:47.570554 1 server.go:113] FLAG: --logtostderr="true"
I0105 19:08:47.570563 1 server.go:113] FLAG: --stderrthreshold="2"
I0105 19:08:47.570572 1 server.go:113] FLAG: --v="2"
I0105 19:08:47.570581 1 server.go:113] FLAG: --version="false"
I0105 19:08:47.570592 1 server.go:113] FLAG: --vmodule=""
I0105 19:08:47.570620 1 server.go:155] Starting SkyDNS server (0.0.0.0:10053)
I0105 19:08:47.573893 1 server.go:165] Skydns metrics enabled (/metrics:10055)
I0105 19:08:47.573977 1 dns.go:144] Starting endpointsController
I0105 19:08:47.573991 1 dns.go:147] Starting serviceController
I0105 19:08:47.574232 1 logs.go:41] skydns: ready for queries on cluster.local. for tcp://0.0.0.0:10053 [rcache 0]
I0105 19:08:47.574233 1 logs.go:41] skydns: ready for queries on cluster.local. for udp://0.0.0.0:10053 [rcache 0]
I0105 19:08:47.605550 1 dns.go:274] New service: kubernetes-dashboard
I0105 19:08:47.605551 1 dns.go:274] New service: kubernetes
I0105 19:08:47.605551 1 dns.go:384] Added SRV record &{Host:kubernetes.default.svc.cluster.local. Port:443 Priority:10 Weight:10 Text: Mail:false Ttl:30 TargetStrip:0 Group: Key:}
I0105 19:08:47.605551 1 dns.go:274] New service: kube-dns
I0105 19:08:47.605552 1 dns.go:384] Added SRV record &{Host:kube-dns.kube-system.svc.cluster.local. Port:53 Priority:10 Weight:10 Text: Mail:false Ttl:30 TargetStrip:0 Group: Key:}
I0105 19:08:47.605557 1 dns.go:384] Added SRV record &{Host:kube-dns.kube-system.svc.cluster.local. Port:53 Priority:10 Weight:10 Text: Mail:false Ttl:30 TargetStrip:0 Group: Key:}
I0105 19:08:47.605604 1 dns.go:274] New service: heapster
E0105 19:08:47.605785 1 sync.go:105] Error getting ConfigMap kube-system:kube-dns err: configmaps "kube-dns" not found
E0105 19:08:47.605805 1 dns.go:190] Error getting initial ConfigMap: configmaps "kube-dns" not found, starting with default values
I0105 19:08:47.605819 1 dns.go:163] Waiting for Kubernetes service
I0105 19:08:47.605829 1 dns.go:169] Waiting for service: default/kubernetes
I0105 19:08:47.608654 1 server.go:126] Setting up Healthz Handler (/readiness)
I0105 19:08:47.608742 1 server.go:131] Setting up cache handler (/cache)
I0105 19:08:47.608762 1 server.go:120] Status HTTP port 8081
I0105 19:13:47.575731 1 dns.go:274] New service: heapster
I0105 19:13:47.576050 1 dns.go:274] New service: kubernetes-dashboard
I0105 19:13:47.576162 1 dns.go:274] New service: kubernetes
I0105 19:13:47.576243 1 dns.go:384] Added SRV record &{Host:kubernetes.default.svc.cluster.local. Port:443 Priority:10 Weight:10 Text: Mail:false Ttl:30 TargetStrip:0 Group: Key:}
I0105 19:13:47.576303 1 dns.go:274] New service: kube-dns
I0105 19:13:47.576357 1 dns.go:384] Added SRV record &{Host:kube-dns.kube-system.svc.cluster.local. Port:53 Priority:10 Weight:10 Text: Mail:false Ttl:30 TargetStrip:0 Group: Key:}
I0105 19:13:47.576406 1 dns.go:384] Added SRV record &{Host:kube-dns.kube-system.svc.cluster.local. Port:53 Priority:10 Weight:10 Text: Mail:false Ttl:30 TargetStrip:0 Group: Key:}
I0105 19:18:47.575979 1 dns.go:274] New service: kubernetes-dashboard
I0105 19:18:47.576110 1 dns.go:274] New service: kubernetes
I0105 19:18:47.576149 1 dns.go:384] Added SRV record &{Host:kubernetes.default.svc.cluster.local. Port:443 Priority:10 Weight:10 Text: Mail:false Ttl:30 TargetStrip:0 Group: Key:}
I0105 19:18:47.576184 1 dns.go:274] New service: kube-dns
I0105 19:18:47.576215 1 dns.go:384] Added SRV record &{Host:kube-dns.kube-system.svc.cluster.local. Port:53 Priority:10 Weight:10 Text: Mail:false Ttl:30 TargetStrip:0 Group: Key:}
I0105 19:18:47.576242 1 dns.go:384] Added SRV record &{Host:kube-dns.kube-system.svc.cluster.local. Port:53 Priority:10 Weight:10 Text: Mail:false Ttl:30 TargetStrip:0 Group: Key:}
I0105 19:18:47.576270 1 dns.go:274] New service: heapster
I0105 19:23:47.576239 1 dns.go:274] New service: kubernetes-dashboard
I0105 19:23:47.576473 1 dns.go:274] New service: kubernetes
I0105 19:23:47.576538 1 dns.go:384] Added SRV record &{Host:kubernetes.default.svc.cluster.local. Port:443 Priority:10 Weight:10 Text: Mail:false Ttl:30 TargetStrip:0 Group: Key:}
I0105 19:23:47.576603 1 dns.go:274] New service: kube-dns
I0105 19:23:47.576657 1 dns.go:384] Added SRV record &{Host:kube-dns.kube-system.svc.cluster.local. Port:53 Priority:10 Weight:10 Text: Mail:false Ttl:30 TargetStrip:0 Group: Key:}
I0105 19:23:47.576707 1 dns.go:384] Added SRV record &{Host:kube-dns.kube-system.svc.cluster.local. Port:53 Priority:10 Weight:10 Text: Mail:false Ttl:30 TargetStrip:0 Group: Key:}
I0105 19:23:47.576758 1 dns.go:274] New service: heapster
I0105 19:28:47.578044 1 dns.go:274] New service: heapster
I0105 19:28:47.578172 1 dns.go:274] New service: kubernetes-dashboard
I0105 19:28:47.578207 1 dns.go:274] New service: kubernetes
I0105 19:28:47.578240 1 dns.go:384] Added SRV record &{Host:kubernetes.default.svc.cluster.local. Port:443 Priority:10 Weight:10 Text: Mail:false Ttl:30 TargetStrip:0 Group: Key:}
I0105 19:28:47.578274 1 dns.go:274] New service: kube-dns
I0105 19:28:47.578309 1 dns.go:384] Added SRV record &{Host:kube-dns.kube-system.svc.cluster.local. Port:53 Priority:10 Weight:10 Text: Mail:false Ttl:30 TargetStrip:0 Group: Key:}
I0105 19:28:47.578336 1 dns.go:384] Added SRV record &{Host:kube-dns.kube-system.svc.cluster.local. Port:53 Priority:10 Weight:10 Text: Mail:false Ttl:30 TargetStrip:0 Group: Key:}
I0105 19:33:47.578187 1 dns.go:274] New service: kubernetes
I0105 19:33:47.578286 1 dns.go:384] Added SRV record &{Host:kubernetes.default.svc.cluster.local. Port:443 Priority:10 Weight:10 Text: Mail:false Ttl:30 TargetStrip:0 Group: Key:}
I0105 19:33:47.578316 1 dns.go:274] New service: kube-dns
I0105 19:33:47.578336 1 dns.go:384] Added SRV record &{Host:kube-dns.kube-system.svc.cluster.local. Port:53 Priority:10 Weight:10 Text: Mail:false Ttl:30 TargetStrip:0 Group: Key:}
I0105 19:33:47.578356 1 dns.go:384] Added SRV record &{Host:kube-dns.kube-system.svc.cluster.local. Port:53 Priority:10 Weight:10 Text: Mail:false Ttl:30 TargetStrip:0 Group: Key:}
I0105 19:33:47.578377 1 dns.go:274] New service: heapster
I0105 19:33:47.578399 1 dns.go:274] New service: kubernetes-dashboard
******* dnsmasq *******
dnsmasq[1]: started, version 2.76 cachesize 1000
dnsmasq[1]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth no-DNSSEC loop-detect inotify
dnsmasq[1]: using nameserver 127.0.0.1#10053
dnsmasq[1]: read /etc/hosts - 7 addresses
******* dnsmasq-metrics *******
ERROR: logging before flag.Parse: I0105 19:09:03.298455 1 main.go:38] dnsmasq-metrics v1.0
ERROR: logging before flag.Parse: I0105 19:09:03.298511 1 server.go:44] Starting server (options {DnsMasqPort:53 DnsMasqAddr:127.0.0.1 DnsMasqPollIntervalMs:5000 PrometheusAddr:0.0.0.0 PrometheusPort:10054 PrometheusPath:/metrics PrometheusNamespace:dnsmasq PrometheusSubsystem:cache})
******* healthz *******
# logs for kube-dns-autoscaler
> kubectl logs --namespace=kube-system kube-dns-autoscaler-2715466192-z76xg
I0105 19:08:33.500772 1 autoscaler.go:49] Scaling Namespace: kube-system, Target: deployment/kube-dns, Mode: linear
I0105 19:08:33.540100 1 autoscaler_server.go:142] ConfigMap not found: configmaps "kube-dns-autoscaler" not found, will create one with default params
I0105 19:08:33.547018 1 k8sclient.go:120] Created ConfigMap kube-dns-autoscaler in namespace kube-system
I0105 19:08:33.547114 1 linear_controller.go:53] ConfigMap version change (old: new: 271) - rebuilding params
I0105 19:08:33.547917 1 linear_controller.go:54] Params from apiserver:
{"coresPerReplica":256,"min":1,"nodesPerReplica":16}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.