I had same message in another modification.
This is the config file for kubectl command.
So your error is probably also because the script/command has a kubectl instruction somewhere.
I have used ls -l to list the k3s.yaml file and it is rw for “root” user only.
For me it worked to do “sudo kubectl …”. By running the command as root, the error was gone.
Another option is to “chmod o+rw /etc/rancher/k3s/k3s.yaml” (making the file open for read-write for everybody but this is not permanent change and will be overwritten at next update. As this is not a best practise in matter of security, you should execute any command then put it back to initial status with “chmod o-rw /etc/rancher/k3s/k3s.yaml”.