Hey @fzyzcjy, welcome to discuss
How are you configuring Filebeat? With autodiscover you can make Filebeat to discover automatically your running redis containers and add an only configuration for them, so you don't need to manually add additional entries for each one of your hosts. As you said, having to configure the list of hosts on all filebeat would have bad consequences, apart of being quite cumbersome
With autodiscover It would be something like this (not tested, but you can get the idea):
- type: kubernetes
- module: redis
This will start a redis module for each container with a image that contains "redis" on its name. The configuration includes some variables that will be replaced, in this case with the container id, and with its IP respectively.
You can read more about autodiscover here: https://www.elastic.co/guide/en/beats/filebeat/7.9/configuration-autodiscover.html