K8s Global pod settings

12/19/2018

I am debugging certain behavior from my application pods; i am launching on K8s cluster. In order to do that I am increasing logging by increasing verbosity of deployment by adding --v=N flag to Kubectl create deployment command.

my question is : how can i configure increased verbosity globally so all pods start reporting increased verbosity; including pods in kube-system name space.

i would prefer if it can be done without re-starting k8s cluster; but if there is no other way I can re-start.

thanks Ankit

-- ankit patel
kubectl
kubernetes

1 Answer

12/19/2018

For your applications, there is nothing global as that is not something that has global meaning. You would have to add the appropriate config file settings, env vars, or cli options for whatever you are using.

For kubernetes itself, you can turn up the logging on the kubelet command line, but the defaults are already pretty verbose so I’m not sure you really want to do that unless you’re developing changes for kubernetes.

-- coderanger
Source: StackOverflow