码迷,mamicode.com
首页 > 其他好文 > 详细

k8s各组件启动时, -v参数指定的日志级别

时间:2020-10-31 02:14:23      阅读:12      评论:0      收藏:0      [点我收藏+]

标签:rally   change   always   install   play   this   inf   contain   out   

k8s 相关组件启动时 -v参数指定的日志级别

--v=0   Generally useful for this to ALWAYS be visible to an operator.
--v=1   A reasonable default log level if you don’t want verbosity.
--v=2   Useful steady state information about the service and important log messages that may correlate to significant changes in the system. This is the recommended default log level for most systems.
--v=3   Extended information about changes.
--v=4   Debug level verbosity.
--v=6   Display requested resources.
--v=7   Display HTTP request headers.
--v=8   Display HTTP request contents

示例:

[root@node-08 ~]# cat /usr/lib/systemd/system/kubelet.service 
[Unit]
Description=Kubernetes Kubelet Server
After=docker.service
Requires=docker.service

[Service]
WorkingDirectory=/var/lib/kubelet
ExecStart=/usr/local/bin/kubelet   --kubeconfig=/root/.kube/config   --hostname-override=172.20.59.57   --pod-infra-container-image=172.20.59.190:81/k8s/pause-amd64:3.1   --logtostderr=false   --log-dir=/var/log/kubernetes   --v=4       #此处为需要配置的日志级别
Restart=on-failure

[Install]
WantedBy=multi-user.targe

k8s各组件启动时, -v参数指定的日志级别

标签:rally   change   always   install   play   this   inf   contain   out   

原文地址:https://www.cnblogs.com/chuanzhang053/p/13903721.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!