Kubernetes no matches for kind "Deployment" in version "extensions/v1beta1"
My problem was because in the Jenkinsfile I was using the Kubernetes dashboard URL instead of the Kubernetes API URL, so the kubectl of Jenkins couldn't recognize the kubernetes server.
So finally, using the API URL and updating the apiVersion it works for me.