Connection to apiserver-webhook forbidden when specifying a namespace in policy.json


#1

Ref: here https://github.com/kubernetes/cloud-provider-openstack/blob/master/examples/webhook/policy.json
I am using the following reference to make a policy.json specifying namespace. for e.g : “namespace”: “tenant-a”
In this situation the kubectl get pod returns "the server doesn’t have a resource type “pods”.
However i am able to get the pods when i specify
curl -k -v -XGET -H “Accept: application/json” -H “Authorization: Bearer $TOKEN” https://:6443/api/v1/namespaces/tenant-a/pods

$ kubectl config get-contexts

Am i missing something?