This is a single-machine playground. A multi-machine playground for larger and HA clusters is WIP.
kubelet
: The primary node agent that runs on each nodekubeadm
: Cluster lifecycle management and bootstrappingkubectl
(alias: k
): Kubernetes cluster management and debuggingnerdctl
: Docker-compatible CLI for containerd
krew
: kubectl
plugin manager for extending functionalityIf you want to quickly set up a working cluster, use the automated script:
/opt/lab/init.sh --remove-taint
Option | Default | Description |
---|---|---|
--remove-taint | false | Remove the NoSchedule taint that may prevent pods from being scheduled to this node. |
--cni | flannel | Network add-on to install. Valid values: none , flannel , canal |
--no-load-images | false | Do not load the images from local cache. |
⚠️ When none
is selected as the network addon, the initialization script will skip installing any CNI plugin.
On the dev-machine
, run the following command to configure kubectl
:
/opt/lab/configure.sh
For a manual setup, check out this tutorial.
# Check all system pods are running
kubectl get pods --all-namespaces
# Deploy a test application
kubectl create deployment podinfo --image=ghcr.io/stefanprodan/podinfo --port=9898
kubectl expose deployment podinfo --port=9898
# Wait for the pod to be ready
kubectl wait --for=condition=Ready pods --all --timeout=300s
# Check the deployment
kubectl get pods,services
# Send a request to the application
curl http://$(kubectl get svc podinfo -o jsonpath='{.spec.clusterIP}:{.spec.ports[0].port}')
The easiest way to reset the cluster is terminating the playground and starting a new one.
That being said, it's a good idea to learn how to reset the cluster manually.
First, reset the cluster itself using kubeadm
:
kubeadm reset -f
Stop kubelet
:
systemctl stop kubelet
Then cleanup any CNI config created by the network addon you installed:
rm -rf /etc/cni/net.d/*.{conf,conflist}
Delete any CNI interfaces created by the network addon:
ip link delete cni0
# For flannel
ip link delete flannel.1
Happy learning! 🚀
This is a single-machine playground. A multi-machine playground for larger and HA clusters is WIP.
kubelet
: The primary node agent that runs on each nodekubeadm
: Cluster lifecycle management and bootstrappingkubectl
(alias: k
): Kubernetes cluster management and debuggingnerdctl
: Docker-compatible CLI for containerd
krew
: kubectl
plugin manager for extending functionalityIf you want to quickly set up a working cluster, use the automated script:
/opt/lab/init.sh --remove-taint
Option | Default | Description |
---|---|---|
--remove-taint | false | Remove the NoSchedule taint that may prevent pods from being scheduled to this node. |
--cni | flannel | Network add-on to install. Valid values: none , flannel , canal |
--no-load-images | false | Do not load the images from local cache. |
⚠️ When none
is selected as the network addon, the initialization script will skip installing any CNI plugin.
On the dev-machine
, run the following command to configure kubectl
:
/opt/lab/configure.sh
For a manual setup, check out this tutorial.
# Check all system pods are running
kubectl get pods --all-namespaces
# Deploy a test application
kubectl create deployment podinfo --image=ghcr.io/stefanprodan/podinfo --port=9898
kubectl expose deployment podinfo --port=9898
# Wait for the pod to be ready
kubectl wait --for=condition=Ready pods --all --timeout=300s
# Check the deployment
kubectl get pods,services
# Send a request to the application
curl http://$(kubectl get svc podinfo -o jsonpath='{.spec.clusterIP}:{.spec.ports[0].port}')
The easiest way to reset the cluster is terminating the playground and starting a new one.
That being said, it's a good idea to learn how to reset the cluster manually.
First, reset the cluster itself using kubeadm
:
kubeadm reset -f
Stop kubelet
:
systemctl stop kubelet
Then cleanup any CNI config created by the network addon you installed:
rm -rf /etc/cni/net.d/*.{conf,conflist}
Delete any CNI interfaces created by the network addon:
ip link delete cni0
# For flannel
ip link delete flannel.1
Happy learning! 🚀
Pro Tip: Install iximiuz Labs CLI to start playgrounds and SSH into them from your favorite local terminal:
curl -sf https://labs.iximiuz.com/cli/install.sh | sh