操作:从Docker容器将日志发送到Google Logs Viewer。
面对的错误
我关注了这篇文章:https://docs.docker.com/config/containers/logging/gcplogs/
并执行docker run --log-driver=gcplogs nginx
docker: Error response from daemon: failed to initialize logging driver: unable to connect or authenticate with Google Cloud Logging: rpc error: code = PermissionDenied desc = The caller does not have permission.
操作系统:容器优化的操作系统cos-81-12871-1196-0
我还使用具有log.admin
和log.writer
角色的服务帐户尝试了The Google Cloud Logging driver for Docker
如何将日志发送到Stackdriver / Google Cloud Logging