112. Rancher v2.x Windows 日志收集脚本

张开发
2026/4/12 6:32:57 15 分钟阅读

分享文章

112. Rancher v2.x Windows 日志收集脚本
Environment 环境Rancher 2.x 牧场主 2.xWindows worker nodes Windows 工作节点Note: the collector refers to docker and RKE usage which are both deprecated.注意收集器指的是 docker 和 RKE 的使用这两者都已被弃用。Situation 地理位置Collecting logs from a Rancher 2.x cluster with Windows worker nodes using the Rancher v2.x Windows worker node log collection script.使用 Rancher v2.x Windows 工作节点日志收集脚本从带有 Windows 工作节点的集群中收集日志。N.B. The script needs to be downloaded and run directly on a Windows worker node using a Powershell session with Administrator Privileges.注意脚本需要下载并通过带有管理员权限的 Powershell 会话直接在 Windows 工作节点上运行。Resolution 结局To run the script, open a new Powershell window with Administrator Privileges and run the following command:要运行脚本请用管理员权限打开一个新的 Powershell 窗口并执行以下命令Set-ExecutionPolicy Bypass -Scope Process -Force iwr -useb https://raw.githubusercontent.com/rancherlabs/support-tools/master/collection/rancher/v2.x/windows-log-collector/win-log-collect.ps1 -OutFile win-log-collect.ps1 .\win-log-collect.ps1Upon successful completion, the log bundle will be written to the root of the C:\ drive in a file namedrancher_hostname_datetime.tar.gz.成功完成后日志包将写入 C\ 驱动器根节点文件名为rancher_hostname_datetime.tar.gz。Cause 病因Additional Information 附加信息See here for readme: 这里有阅读说明https://github.com/rancherlabs/support-tools/tree/master/collection/rancher/v2.x/windows-log-collector访问Rancher-K8S解决方案博主企业合作伙伴 https://blog.csdn.net/lidw2009

更多文章