DevLearn
Architecture

Kubernetes Architecture

Deep dive into Kubernetes control plane components: API Server, etcd, Scheduler, and Controller Manager.

API Server

The Kubernetes frontend

The API server is the frontend for the Kubernetes control plane. It exposes the Kubernetes API and handles REST operations. All components communicate through the API server. It validates and configures data for API objects.

REST API

HTTP interface

Authn/z

Authentication & authorization

Validation

Request validation

Audit

Request logging

Code Example

# Check API server health
kubectl get --raw='/healthz?verbose'

# Check API versions
kubectl api-versions

# Check API resources
kubectl api-resources

# Direct API call
curl -k https://localhost:6443/api/v1/namespaces \
  --header "Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)"

# Watch API calls (in audit logs)
cat /var/log/kubernetes/audit.log | grep "create pods"

Sample Output

API Server Status:
[+]ping ok
[+]log ok
[+]etcd ok
[+]etcd-read ok
[+]etcd-write ok
livez check passed

Available API versions:
apiextensions.k8s.io/v1
apiregistration.k8s.io/v1
apps/v1
batch/v1
core/v1
...