Kubeconfig

Kubeconfig provides remote kubectl access to the K3s cluster without SSH-ing to MEGATRON.

Default Location

On MEGATRON, the kubeconfig is automatically available:

# K3s stores it at:
/etc/rancher/k3s/k3s.yaml

# Usually symlinked or copied to:
~/.kube/config

Remote Access

To use kubectl from another machine (e.g., MacBook M4):

  1. Copy the kubeconfig from MEGATRON:
scp megatron:/etc/rancher/k3s/k3s.yaml ~/.kube/megatron-config
  1. Update the server address to the Tailscale IP:
sed -i 's/127.0.0.1/100.70.25.47/' ~/.kube/megatron-config
  1. Use it:
export KUBECONFIG=~/.kube/megatron-config
kubectl get nodes

K3s API Server

PropertyValue
Port6443
Address100.70.25.47:6443 (via Tailscale)
AuthClient certificate (from kubeconfig)

TODO: expand with multi-context setup, RBAC configuration, and service account tokens.