DISCLAIMER: This is an unofficial guide. If you mess things up then you may lock yourself out of TrueNAS or even worse, make it unusable. There's also no guarantee that this works in the future.
Currently the easiest way to access kubectl
is through ssh and k3s tool. If
you have ssh access enabled then you can ssh to your TrueNAS server and use it