1.6 KiB
1.6 KiB
High Availability Setup for K3s Cluster
Current Situation
- node1 (10.0.101.21): Has public IP 204.110.191.2, currently being updated
- node2 (10.0.101.22): No public IP
- node3 (10.0.101.23): No public IP
Solution Options
Option 1: Floating IP (Recommended if your provider supports it)
Use a floating/virtual IP that can be moved between nodes:
- Get a floating IP from your provider
- Use Keepalived to manage automatic failover
- Install MetalLB or Kube-VIP for in-cluster load balancing
Option 2: External Load Balancer (Best for production)
Use your hosting provider's load balancer or set up HAProxy/Nginx:
- Set up an external load balancer pointing to all 3 nodes
- Configure health checks on port 6443 (K3s API)
- For services, use NodePort and configure LB to forward to all nodes
Option 3: DNS Round-Robin with Health Checks (Simple but less reliable)
Configure multiple A records with health checking:
- Add A records for all node IPs to your domain
- Use a DNS provider that supports health checks (like Route53)
- Automatically remove unhealthy nodes from rotation
Option 4: Tailscale + Caddy on Separate Host (Quick solution)
Since you have Tailscale, use a separate small VPS as a reverse proxy:
- Get a small VPS with public IP
- Install Tailscale and join your network
- Install Caddy to reverse proxy to cluster services
- Point DNS to this VPS instead of directly to cluster
Immediate Solution: Configure Services for High Availability
While node1 is down, ensure your apps remain accessible:
1. Configure Pod Anti-Affinity
Ensure critical pods run on different nodes: