您可以在容器中运行 syslog 代理(如 rsyslog 或 syslog-ng),以将日志从 NCP 和相关的组件发送到 syslog 服务器。

可以使用以下方法之一来配置日志记录。有关 Kubernetes 中的日志记录的详细信息,请参阅https://kubernetes.io/docs/concepts/cluster-administration/logging

  • 创建一个在 NCP 或 nsx-node-agent pod 中运行的 sidecar 容器。
  • 在每个节点上运行一个 DaemonSet 副本。
注: 使用 sidecar 容器方法时,无法将 NSX CNI 插件日志发送到 syslog 服务器,因为该插件不在 pod 中运行。