Setting Up a 1+2 Node Kubernetes Cluster with Dapr on Windows
1. Prerequisites
Ensure you have the following installed on your Windows machine:
- Docker Desktop: Running with the WSL2 backend.
- Kind: Install via PowerShell:
choco install kindor download the binary. - Helm: For managing Dapr packages.
- kubectl: The Kubernetes command-line tool.
2. Creating the Multi-Node Cluster
Docker Desktop's default Kubernetes does not support multiple nodes. We will use a kind configuration file to define our 3-node topology.
Create a file named cluster-config.yaml:
Apply the configuration: Open your terminal (PowerShell or CMD) and run:
Verify that all three nodes are up and running:
3. Installing Dapr via Helm
Once the multi-node cluster is ready, we proceed with the Dapr installation as specified.
Add and update the Helm repository:
4. Applying Custom Dapr Configuration
By default, Dapr enables mutual TLS (mTLS). To apply your specific configuration (disabling mTLS and setting TTL), create a file named dapr-config.yaml:
Deploy the configuration:
5. Verification on the Multi-Node Cluster
In a multi-node environment, it is crucial to ensure that the Dapr sidecars and control plane components are distributed across your nodes and are healthy.
Check Pod status and Node assignment:
Note: In the output, look at theNODEcolumn. You should see the Dapr components distributed between your control-plane and worker nodes. If a node is under-resourced (common on Windows laptops), some pods might stay inPending. Ensure Docker Desktop has at least 8GB of RAM allocated.
Summary Checklist
- Cluster: Kind created 1 Control Plane and 2 Workers.
- Dapr: Installed via Helm into
dapr-systemnamespace. - Config:
dapr-configapplied to thedefaultnamespace with mTLS disabled. - Health: Verified using
kubectl get pods -o wide.