Open4
Tailscale を k8s に deploy したい
モチベ
Tailscale を k8s 上で hosting したい
ref
https://github.com/tailscale/tailscale/pkgs/container/tailscale
image:
§Tailscale を Kuberenetes にデプロイする
env var
§Secretのすべてのkey-valueペアを環境変数として設定する
code
command
kubectl create secret generic tailscale-auth-test-secret \
--from-literal=TS_KUBE_SECRET='tailscale' \
--from-literal=TS_USERSPACE='true' \
--from-literal=TS_AUTH_KEY='tskey-0123456789abcdef' \
--from-literal=TS_ROUTES="10.96.0.0/12" \
# --from-literal=TS_ACCEPT_DNS=true
;
manifest
apiVersion: v1
kind: Pod
metadata:
name: tailscale-auth-test
spec:
serviceAccountName: "tailscale"
containers:
- name: tailscale-auth-test-container
image: "ghcr.io/tailscale/tailscale:latest"
envFrom:
- secretRef:
name: tailscale-auth-test-secret
Tailscale の公式 Makefile、 kustomize build
で良いのでは?
ref.
なんかある
kubeconfig
Configure kubectl to connect to a Kubernetes cluster using Tailscale.
$ tailscale configure kubeconfig -h
USAGE
kubeconfig <hostname-or-fqdn>
Run this command to configure kubectl to connect to a Kubernetes cluster over Tailscale.
The hostname argument should be set to the Tailscale hostname of the peer running as an auth proxy in the cluster.
See: https://tailscale.com/s/k8s-auth-proxy