Troubleshoot Cluster Connectivity with Lens
Diagnose and resolve connection problems between Lens and a SleakOps Kubernetes cluster, typically caused by VPN configuration or DNS resolution issues.
Prerequisites
- Lens installed and configured with the cluster kubeconfig
- Pritunl client installed and a VPN profile configured
Diagnosis and fixes
Step 1 — Check VPN status
- Make sure no other VPN is connected simultaneously.
- Verify that the Pritunl VPN connection is active.
- Lens does not handle network changes gracefully — if you connect or disconnect a VPN while Lens is open, restart Lens.
- Try the Pritunl reset buttons:
- Reset local DNS service
- Reset Networking
Step 2 — Fix DNS resolution
The most common cause of Lens connectivity failures is the machine trying to resolve the cluster hostname using public DNS servers instead of the AWS VPC's private DNS resolver.
Linux and macOS — update /etc/resolv.conf:
sudo nano /etc/resolv.conf
Add the nameservers for your environments:
nameserver 10.110.0.2 # DEV VPC DNS
nameserver 10.120.0.2 # MGT VPC DNS
nameserver 10.130.0.2 # PRD VPC DNS
/etc/resolv.conf is regenerated automatically when the network changes. You may need to re-apply this while connected to the VPN, and after reboots or network switches.
Windows — update DNS settings:
- Open Control Panel → Network and Sharing Center.
- Click Change adapter settings (left column).
- Right-click the active connection (Ethernet or Wi-Fi) → Properties.
- Select Internet Protocol Version 4 (TCP/IPv4) → Properties.
- Choose Use the following DNS server addresses.
- Enter the VPC DNS for your environment (e.g.,
10.130.0.2) as the preferred server and a public fallback like8.8.8.8. - Click OK.
Step 3 — Enable "Force DNS" in Pritunl
In the Pritunl connection profile, enable the Force DNS configuration option. This ensures Pritunl overrides the system DNS with the VPN's DNS servers when connected.
DNS reference by environment
| Environment | VPC DNS |
|---|---|
| DEV | 10.110.0.2 |
| MGT | 10.120.0.2 |
| PRD | 10.130.0.2 |