编译kubelet
yum install -y gcc
go env -w GO111MODULE="off"
cd $GOPATH/src/k8s.io/kubernetes/cmd/kubelet
go install -v
替换kubelet
systemctl stop kubelet.service
mv /usr/bin/kubelet /usr
mv $GOPATH/bin/kubelet /usr/bin
systemctl start kubelet.service
输出日志到指定文件
默认情况下,kubelet日志输出到系统日志/var/log/messages里面。
mkdir /var/log/kubelet
echo "KUBELET_EXTRA_ARGS=--fail-swap-on=false --log-dir=/var/log/kubelet --log-file=/var/log/kubelet/kubelet.log --v=5" > /etc/sysconfig/kubelet
kill `pidof kubelet`
标签:log,编译,--,kubelet,usr,var,日志 From: https://www.cnblogs.com/WJQ2017/p/17536418.html