how to disabled kubernetes log to disk file?

5/7/2016

I have tried

kubectl create -f x.yaml --logtostderr=true

but it didn't work.

enter image description here

-- huhuhu
kubernetes

1 Answer

5/7/2016

The Kubernetes API doesn't currently expose a way to change the logging behavior. It'll rotate the log files as appropriate to avoid filling up the disk, but if you need more control, you'll have to modify the docker daemon on each node to change its logging driver.

Or if you want to do it for a specific application, change the command in your x.yaml file that you're using to start the app to redirect stdout and stderr to /dev/null inside the container.

-- Alex Robinson
Source: StackOverflow