Play with the Kubernetes API server and discover what makes Kubernetes tick.
Startup configuration
kube-apiserver
This environment is set up for learning how the Kubernetes API server works in isolation.
🎯 Getting Started
Even though this "cluster" isn't fully functional (no controller manager or scheduler),
kubectl can still be used to interact with the Kubernetes API server:
kubectl cluster-info
💡 Use the k alias to keep commands short.
Hint
krew also available to install plugins:
kubectl krew --help
Since the Kubernetes API is just a regular REST API,
it can be accessed directly using curl:
Resources that depend on the controller manager won't function properly:
# These will create API objects but won't result in actual pods
kubectl create deployment podinfo --image=ghcr.io/stefanprodan/podinfo
kubectl create job test-job --image=busybox -- echo "hello"
The API server will accept these resources, but without the controller manager:
Deployments won't create ReplicaSets or Pods
Jobs won't create Pods
Services won't get endpoints
🔧 Customizing API Server
Customize API server flags:
echo "KUBE_APISERVER_OPTS=\"--feature-gates=Foo=true\"" | sudo tee /etc/default/kube-apiserver
sudo systemctl restart kube-apiserver
Play with the Kubernetes API server and discover what makes Kubernetes tick.
Startup configuration
kube-apiserver
This environment is set up for learning how the Kubernetes API server works in isolation.
🎯 Getting Started
Even though this "cluster" isn't fully functional (no controller manager or scheduler),
kubectl can still be used to interact with the Kubernetes API server:
kubectl cluster-info
💡 Use the k alias to keep commands short.
Hint
krew also available to install plugins:
kubectl krew --help
Since the Kubernetes API is just a regular REST API,
it can be accessed directly using curl:
Resources that depend on the controller manager won't function properly:
# These will create API objects but won't result in actual pods
kubectl create deployment podinfo --image=ghcr.io/stefanprodan/podinfo
kubectl create job test-job --image=busybox -- echo "hello"
The API server will accept these resources, but without the controller manager:
Deployments won't create ReplicaSets or Pods
Jobs won't create Pods
Services won't get endpoints
🔧 Customizing API Server
Customize API server flags:
echo "KUBE_APISERVER_OPTS=\"--feature-gates=Foo=true\"" | sudo tee /etc/default/kube-apiserver
sudo systemctl restart kube-apiserver