kubectl logs is not always able to retrieve the logs of pods What you expected to happen:
kubectl logs would show the logs of running pods How to reproduce it (as minimally and precisely as possible):
kubectl get pods -n kube-system
NAME READY STATUS RESTARTS AGE
heapster-dfd674df9-r49f9 1/1 Running 0 5m
kube-dns-5d585466b5-ghxk2 3/3 Running 0 4h
kubernetes-dashboard-7494579689-tbwln 1/1 Running 0 5m
monitoring-grafana-76848b566c-xl8n9 1/1 Running 0 5m
monitoring-influxdb-6c4b84d695-7452w 1/1 Running 0 5m
tiller-deploy-8dc84bcc8-9brjg 1/1 Running 0 3h
kubectl -n kube-system logs heapster-dfd674df9-r49f9
Error from server (NotFound): the server could not find the requested resource ( pods/log heapster-dfd674df9-r49f9)
Anything else we need to know?:
This is a new installation of kubernetes 1.9.0 ( the master and three nodes are running 1.9.0).
Even though it is not possible to see the logs the containers seem to run fine.
Logs can be viewed on the nodes that hold the containers by running docker logs.
Some of the pod logs can be viewed Environment: