khuedoan-homelab/scripts/get-wireguard-config
Khue Doan 2cd8a249b6 refactor!: replace ZeroTier with Tailscale and Wireguard
- Tailscale UX is better, and the Headscale control server is also
  easier to self-host than ZeroTier (although Headscale is not the
  official control server, the author now works at Tailscale)
- Wireguard is also added as an alternative to avoid relying on a
  third-party service, however it requires port-forwarding
2024-04-18 20:11:18 +07:00

11 lines
254 B
Bash
Executable File

#!/bin/sh
set -eu
PEER="${1}"
export KUBECONFIG=./metal/kubeconfig.yaml
kubectl -n wireguard exec -it deployment/wireguard -- /app/show-peer "${PEER}"
kubectl -n wireguard exec -it deployment/wireguard -- cat "/config/peer_${PEER}/peer_${PEER}.conf"