kubernetes: `kubectl logs` does not work for pods running on the master

k8s version:

Client Version: version.Info{Major:"1", Minor:"3", GitVersion:"v1.3.2", GitCommit:"9bafa3400a77c14ee50782bb05f9efc5c91b3185", GitTreeState:"clean", BuildDate:"2016-07-17T18:30:39Z", GoVersion:"go1.6.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"3", GitVersion:"v1.3.2", GitCommit:"9bafa3400a77c14ee50782bb05f9efc5c91b3185", GitTreeState:"clean", BuildDate:"2016-07-17T18:23:58Z", GoVersion:"go1.6.2", Compiler:"gc", Platform:"linux/amd64"}

daemon set: https://github.com/kubernetes/kubernetes/tree/release-1.3/examples/newrelic

The daemon set deploys correctly and is running on all of the nodes including the master. However logs can be retrieved only from the nodes. Asking for the logs from the pod on the master fails:

$ kubectl --namespace=kube-system logs -f newrelic-agent-7l72w                           
Error from server: the server could not find the requested resource ( pods/log newrelic-agent-7l72w)

Though the logs do exist in Docker. Logging onto the master and running docker logs ... manually shows the expected logs. Is this a general limitation of scheduling work on the master?

Ex:

$ kubectl --namespace=kube-system logs kube-scheduler-ip-172-20-40-126.us-west-2.compute.internal
Error from server: the server could not find the requested resource ( pods/log kube-scheduler-ip-172-20-40-126.us-west-2.compute.internal)

@justinsb

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 16 (10 by maintainers)

Most upvoted comments

How do I go about setting --enable-debugging-handlers=true?