By accessing the website and accepting the Cookie Policy, you agree to use the cookies provided by the Site in accordance with to analyze traffic, remember your preferences, and optimize your experience.

标签 - K3s

K3s K8s    2024-04-15 17:36:06    18    0    0

在使用tailscale混合组网时,部分只有IPv6的节点无法访问docker、github等源站获取镜像,导致无法部署pod。尽管可以使用warp-cli让本机获取访问IPv4网络资源的能力,但仍然无法让这些只有IPv6的节点在k3s集群内部正确拉取IPv4 only的Image镜像。

解决方案:

为了解决这个问题,可以采取以下步骤:

  1. 安装warp-cli并启用socks5代理,指定端口;
  2. 使用环境变量来配置节点的网络设置;
  3. 重启k3s或k3s-agent,应用设置;

优化使用tailscale混合组网时只有IPv6节点无法访问docker和github的问题

在只有IPv6的节点上执行以下命令,安装并注册warp-cli:

  1. apt update && apt install lsb-release gpg curl wget
  2. curl -fsSL https://pkg.cloudflareclient.com/pubkey.gpg | gpg --yes --dearmor --output /usr/share/keyrings/cloudflare-warp-archive-keyring.gpg
  3. echo "deb [arch=amd64 signed-by=/usr/share/keyrings/cloudflare-warp-archive-keyring.gpg] https://pkg.cloudflareclient.com/ $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/cloudflare-client.list
  4. apt update && apt install cloudflare-warp -y
  5. warp-cli register -y

执行以下命令,配置warp为proxy模式,并指定系统代理:

  1. warp-cli add-excluded-route ::0/0
  2. #warp-cli set-mode warp
  3. warp-cli set-mode proxy
  4. warp-cli set-proxy-port 9091
  5. warp-cli