K8s by Example: Local Cluster
| You need a cluster to run Kubernetes. For local development, kind (Kubernetes in Docker) is the fastest way to get started. It runs a cluster inside Docker containers. |
| terminal | |
| Install kind using your package manager. On macOS use Homebrew, on Linux download the binary directly. | |
| terminal | |
| Create a cluster. This pulls the node image and starts a container. Takes about 30 seconds. | |
| terminal | |
| Verify the cluster is running. kind automatically configures kubectl to connect to your new cluster. | |
| terminal | |
| List nodes in the cluster. A basic kind cluster has one node that acts as both control plane and worker. | |
| multi-node.yaml | |
| For a more realistic setup, create a multi-node cluster. This config creates one control plane and two workers. | |
| Pass the config file when creating the cluster. | |
| terminal | |
| Delete the cluster when you’re done. This removes all containers and frees up resources. | |
| terminal | |
| Other options: minikube (more features, slower), k3s (lightweight, good for edge), or Docker Desktop (enable in settings). | |
Index | Use arrow keys to navigate