Using "perf top" inside a container

Hi All,
I’m currently experimenting with perf top inside an Alpine container running under microk8s. After installing the perf tool and enabling the SYS_ADMIN capability in my yml file, I can start perf top but I get the following warning:

Warning:
Kernel address maps (/proc/{kallsyms,modules}) are restricted.

Check /proc/sys/kernel/kptr_restrict and /proc/sys/kernel/perf_event_paranoid.

Kernel modules samples will not be resolved.

It is possible to continue, but perf shows no symbols at all. Modifying the two mentioned files is not possible. Here I get a “Permission denied” error.

Does anybody know where the problem might be?

I have installed microk8s under Ubuntu using snap in classic mode.