My preferred way is to run it baremetal and using packages.
Here are some thoughts:
- severe problems with your hypervisor → no monitoring
- severe problems with your kubernetes cluster → no monitoring
- severe problems with docker → less help from the community
- selfmonitoring the icinga-master using docker → I think you need a container with more privileges or you are monitoring for example the docker disk and not the system disk.
- here is a thread about icinga in a container but it is quite old.
- from my point of view docker is great for testing, like icingaweb2, or icingaweb2-modules with various php, influxdb versions.
- If you have severe problems with your infrastructure and your monitoring is affected by that, it gets a lot harder to find the issues.
- here is the blogpost of ansible-collection-icinga
- and here is an interesting talk on icinga in kubernetes: