The Kubernetes API enables you to query and manipulate an object's state in Kubernetes. The core of the Kubernetes control plane is the API server and HTTP API. Users, different parts of your cluster, and the various external components interact with each other through the API server.
- To locate the apiserver from the pod, you need to use the kubernetes.default.svc DNS name that resolves to a Service IP that sends you to an apiserver. You then need to authenticate using a service account credential. After authentication, run kubectl proxy in a sidecar container within the pod, or alternatively run it in the background inside the container. You can then create a client using the Go client library with the rest.InClusterConfig() and kubernetes.NewForConfig() functions. Read about the process in depth [here](https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/#accessing-the-api-from-a-pod).
- Kubernetes REST API v1.5https://kubernetes.io/docs/reference/