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
?
- Check this Use Awslogs With Kubernetes 'Natively' as it may fit perfectly to your needs.
From Docker documentation link you posted:
Specify
tag
as an alternative to theawslogs-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: