Docker | awslogs driver | Setting meaning stream name Docker | awslogs driver | Setting meaning stream name kubernetes kubernetes

Docker | awslogs driver | Setting meaning stream name


You're correct, there's no sign of --log-opt being implemented into Kubernetes, since dockerd is deprecated.

Instead of specifying the awslogs-stream have you tried to set a tag?

From Docker documentation link you posted:

Specify tag as an alternative to the awslogs-stream option. tag interprets Go template markup, such as {{.ID}}, {{.FullID}} or {{.Name}} docker.{{.ID}}. See the tag option documentation for details on all supported template substitutions.

The other viable approach is using a sidecar container daemon to process the logs and then forward to awslogs but tag is a cleaner, simplier solution.

Here's the process with the fluentd:

How to Send Kubernetes Logs to AWS Cloudwatch