Install脚本提供下载版本号和github版本号不符

环境信息:
K3s 版本: v1.25.4+k3s1

问题描述:
官方版本号是v1.25.4+k3s1
wget rancher-mirror.oss-cn-beijing.aliyuncs.com/k3s/v1.25.4+k3s1/k3s 失败
wget rancher-mirror.oss-cn-beijing.aliyuncs.com/k3s/v1.25.4-k3s1/k3s 成功

复现步骤:

预期结果:

实际结果:

附加上下文/日志:

日志
root@leilei:~ 17:33 $]wget rancher-mirror.oss-cn-beijing.aliyuncs.com/k3s/v1.25.4-k3s1/k3s
--2022-12-07 17:37:06--  http://rancher-mirror.oss-cn-beijing.aliyuncs.com/k3s/v1.25.4-k3s1/k3s
Resolving rancher-mirror.oss-cn-beijing.aliyuncs.com (rancher-mirror.oss-cn-beijing.aliyuncs.com)... 59.110.190.124
Connecting to rancher-mirror.oss-cn-beijing.aliyuncs.com (rancher-mirror.oss-cn-beijing.aliyuncs.com)|59.110.190.124|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 67735552 (65M) [application/octet-stream]
Saving to: ‘k3s.1’

100%[========================================================>] 67,735,552  17.6MB/s   in 3.9s

2022-12-07 17:37:10 (16.4 MB/s) - ‘k3s.1’ saved [67735552/67735552]

[root@leilei:~ 17:37 $]wget rancher-mirror.oss-cn-beijing.aliyuncs.com/k3s/v1.25.4+k3s1/k3s
--2022-12-07 17:37:13--  http://rancher-mirror.oss-cn-beijing.aliyuncs.com/k3s/v1.25.4+k3s1/k3s
Resolving rancher-mirror.oss-cn-beijing.aliyuncs.com (rancher-mirror.oss-cn-beijing.aliyuncs.com)... 59.110.190.124
Connecting to rancher-mirror.oss-cn-beijing.aliyuncs.com (rancher-mirror.oss-cn-beijing.aliyuncs.com)|59.110.190.124|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-12-07 17:37:13 ERROR 404: Not Found.


还有其他的国内地址可以按照github提供的版本号进行下载的么?

我看到安装脚本中对stable记录的版本都会修改+ 为 - 。为啥历史版本不能恢复呢?

  • VERSION_K3S=v1.25.4+k3s1
  • info ‘Using v1.25.4+k3s1 as release’
  • echo '[INFO] ’ ‘Using v1.25.4+k3s1 as release’
    [INFO] Using v1.25.4+k3s1 as release
  • download_hash
  • ‘[’ -n ‘’ ‘]’
  • ‘[’ cn = cn ‘]’
    ++ echo v1.25.4+k3s1
    ++ sed s/+/-/g
  • VERSION_K3S=v1.25.4-k3s1
    我们ci里面需要通过版本去下载这些包。但是版本号不对。我们记录的版本号和实际部署的版本号不一样。

国内安装脚本把 + 改为了 - 是因为阿里云 oss 对 + 进行了处理,导致无法直接下载。

根据你的描述,建议你使用通用的在 github 上的 K3s 安装脚本

谢谢您的解答,主要是我们这边网络限制。