cadvisor 离线安装
操作步骤:Shell登录10.150.60.51ssh 172.23.60.54mount -o remount,rw '/sys/fs/cgroup'ln -s /sys/fs/cgroup/cpu,cpuacct /sys/fs/cgroup/cpuacct,cpucd k8s_images/cadvisor/docker load -i cadvisor.0.3...
·
操作步骤:
- Shell登录10.150.60.51
- ssh 172.23.60.54
- mount -o remount,rw '/sys/fs/cgroup'
- ln -s /sys/fs/cgroup/cpu,cpuacct /sys/fs/cgroup/cpuacct,cpu
- cd k8s_images/cadvisor/
- docker load -i cadvisor.0.30.2.tar
- docker images
- 给镜像命名
docker tag d32c4e2daa0c cadvisor:0.30.2
- 启动cadvisor,标红部分谨慎使用
docker run --volume=/:/rootfs:ro --volume=/var/run:/var/run:rw
--volume=/sys:/sys:ro --volume=/var/lib/docker/:/var/lib/docker:ro --publish=4194:8080 --detach=true --name=cadvisor --restart=always cadvisor:0.30.2
- docker ps -a
- docker logs -f
- 如果遇到如下问题
Failed to start container manager: inotify_add_watch
/sys/fs/cgroup/cpuacct,cpu: no such file or directory
可以执行以下命令:
11 重启cadvisor :docker start cadvisor
更多推荐
已为社区贡献2条内容
所有评论(0)