socktop-webterm/kubernetes/TLDR.md

71 lines
1.5 KiB
Markdown
Raw Permalink Normal View History

# TL;DR - Quick Setup for Busy People
## Prerequisites
- k3s cluster running
- SSH access to k3s nodes
## Setup (6 commands)
```bash
cd kubernetes
# 0. Setup kubectl (if not configured yet)
./setup-kubectl.sh
# Enter your k3s server IP when prompted
# Choose option 2 (save as separate file)
export KUBECONFIG=~/.kube/config-k3s
# 1. Configure registry on all k3s nodes
./setup-registry.sh
# Enter your node IPs when prompted
# 2. Deploy to k3s
./deploy.sh
# Press Enter to use 'default' namespace
# 3. Wait for pods
kubectl get pods -l app=socktop-webterm -w
# 4. Get a k3s node IP
kubectl get nodes -o wide
# 5. Configure NGINX Proxy Manager:
# - Create proxy host for socktop.io
# - Forward to: <k3s-node-ip>:8080
# - Enable WebSocket Support
# - Add SSL certificate
# - Repeat for www.socktop.io and origin.socktop.io
```
## Access
https://socktop.io
## Troubleshooting
**kubectl not configured?**
```bash
./setup-kubectl.sh
export KUBECONFIG=~/.kube/config-k3s
```
**Pods not starting?**
```bash
kubectl logs -l app=socktop-webterm --tail=50
kubectl describe pods -l app=socktop-webterm
```
**ImagePullBackOff?**
- Registry config missing on a node
- Re-run `./setup-registry.sh`
**502 Bad Gateway?**
- NGINX Proxy Manager can't reach k3s
- Verify k3s node IP and port 8080
**WebSocket failing?**
- Enable WebSocket Support in NGINX Proxy Manager
- Add timeouts to Advanced config
## Done!
See `KUBECTL-SETUP.md` for kubectl details.
See `SETUP-GUIDE.md` for detailed walkthrough.