Sometimes it’s useful or necessary to directly access the Kubernetes API server, for exploratory or testing purposes.

In order to do this, one option is to proxy the API to your local environment, using:

kubectl proxy --port=8080
Starting to serve on

Now you can query the API (in a separate terminal session) like so:

curl http://localhost:8080/api/v1
  "kind": "APIResourceList",
  "groupVersion": "v1",
  "resources": [
      "name": "services/status",
      "singularName": "",
      "namespaced": true,
      "kind": "Service",
      "verbs": [

Alternatively, without proxying, you can use kubectl directly as follows to achieve the same:

kubectl get --raw /api/v1

Further, if you want to explore the supported API versions and/or resources, you can use the following commands:

kubectl api-versions
kubectl api-resources
NAME                                  SHORTNAMES       APIGROUP         NAMESPACED   KIND
bindings         true         Binding
componentstatuses                     cs         false        ComponentStatus
configmaps                            cm         true         ConfigMap