# tail 在 docker 中的安装
URL: /%E6%96%87%E6%A1%A3/04.%E5%BC%80%E5%8F%91%E6%96%87%E6%A1%A3/03.%20%E8%BF%90%E7%BB%B4%E6%89%8B%E5%86%8C/02.%20K8S%E8%BF%90%E7%BB%B4/10.%20K8S%20%E5%B8%B8%E7%94%A8%E7%BB%84%E4%BB%B6/03.%20Tailscale


调整成 Kubernetes 标准的

# tail 在 docker 中的安装

## 创建容器

## 安装 Tailscale

curl -fsSL <https://tailscale.com/install.sh> | sh

## 在用户空间网络模式下启动 Tailscale 守护程序

tailscaled --tun=userspace-networking --socks5-server=localhost:1055 &

## 启动

```shell
tailscale up --login-server=https://hs.widiazine.cn --auth-key=7b0053d89fadb2d93e65457e440aba277d2f5f826a7fcd10
```

## 接受子网

```shell
tailscale up --accept-routes --login-server=https://hs.widiazine.cn --auth-key=c72e4147a1fd9767059a7b0124732270ab998d2e44193014
```

# 本地授权

```shell
cat ~/.ssh/id_ed25519.pub

```

## 复制到服务器

``` shell
echo ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDSZn03VFjd3fvNkNcSFC2w+tC5lhLWU75wzn1hHcaa8 hehe-mini-pc >> authorized_keys
```

## 登录
