Understanding the Kubernetes API
The Kubernetes API is the primary interface for interacting with your cluster. Whether using the command-line toolkubectl or directly sending HTTP requests via REST, every interaction communicates with the API server. For example, to check your cluster’s version, run:
/api/v1/pods endpoint.
API Groups and Their Purpose
Kubernetes organizes its API into multiple groups based on specific functionality. These groups help in managing versioning, health metrics, logging, and more. For instance, the/version endpoint provides cluster version data, while endpoints like /metrics and /healthz offer insights into the cluster’s performance and health.

-
Core API Group:
Contains the essential features of Kubernetes such as namespaces, pods, replication controllers, events, endpoints, nodes, bindings, persistent volumes, persistent volume claims, config maps, secrets, and services. -
Named API Groups:
Provides an organized structure for newer features. These groups include apps, extensions, networking, storage, authentication, and authorization. For example, under the apps group, you’ll find Deployments, ReplicaSets, and StatefulSets, whereas the networking group hosts resources such as Network Policies. Certificate-related resources like Certificate Signing Requests are also grouped under their relevant named groups.


Querying the API Server
To retrieve the list of available API groups, access the API server’s root endpoint on port 6443:When using
curl without proper authentication, only selected endpoints (like /version) may be accessible. Unauthenticated requests to protected endpoints will result in a 403 Forbidden error.curl:
kubectl proxy command, which starts a local HTTP proxy server on port 8001 using the credentials in your kubeconfig file. This eliminates the need to manually specify certificate files. Start the proxy by running:
Remember that “kube proxy” and “kubectl proxy” serve different purposes. The former facilitates pod-to-pod and service communication within the cluster, while the latter is a local HTTP proxy for accessing the API server.

Summary
Kubernetes organizes its resources into various API groups. At the highest level, there is the core API group coupled with multiple named API groups, each containing specific resources and actions. The diagram below outlines the hierarchical structure and relationships between API groups, resources, and associated verbs: