Which Kubernetes version and which flavor (Vanilla, AWS, …) are you using?
For debugging purposes, you could help us a bit by providing some additional information. Please follow Debugging the kubernetes - k8s special agent - Checkmk Knowledge Base - Checkmk Knowledge Base
Follow the steps under Debugging K8s special agent
We just need the --debug flag set with the special agent call. This might show why the 401 was raised (e.g. insufficient permissions)