This command kubectl top pods --all-namespaces
is only displaying resource (CPU/memory) usage of pods, it's not related to other processes outside your cluster in your OS, so the total pods consumption memory 9146Mi
is fine.
But for your node I, there is definitely something taking extra memory, I think you might need to do some below checks:
htop
will sort processes based on memory usage, and it might not give much info, because in Linux everything is either file or process. You might need to check also the files opened usinglsof
as they are also consuming memory.Do you use a database proxy (e.g, Heimdall) in front of your node? If so, it might reserve some memory because of the open connections.
check how much memory assigned to K3s in the first place, does is it reserve a fixed amount of memory?
It's worth to try to stop Gitlab process, and check the node's memory again.