docker – Access kubectl commands within my jenkins container

I have a Jenkins container running in docker compose.
Inside my jenkins container I want to access kubectl, so far this was part of my docker-compose.yaml

- /usr/local/bin/kubectl:/usr/local/bin/kubectl
- ~/.kube/config:/var/jenkins_home/.kube/config

But when I do the command kubectl version inside my container it gives the following error

Client Version: v1.30.2
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Error from server (Forbidden):