Rancher v2.13.0 版本本地docker run 安装报错

[root@master ~]# docker run -itd --name=rancher --restart=unless-stopped -p 80:80 -p 443:443 --privileged rancher/rancher:v2.13.0 --no-cacerts
a4b790c3dbe8b7be8551d401fd31e04ec125400bd096e2d3723f5da58847ef16
[root@master ~]# docker logs -f rancher
Restoring git repositories:

  • /var/lib/rancher-data/local-catalogs/v2/rancher-charts/4b40cac650031b74776e87c1a726b0484d0877c3ec137da0872547ff9b73a721/.git
    Updating files: 100% (48591/48591), done.
    Your branch is up to date with ‘origin/release-v2.13’.
    /var/lib/rancher
  • /var/lib/rancher-data/local-catalogs/v2/rancher-rke2-charts/675f1b63a0a83905972dcab2794479ed599a6f41b86cd6193d69472d0fa889c9/.git
    Updating files: 100% (36759/36759), done.
    Your branch is up to date with ‘origin/main’.
    /var/lib/rancher
  • /var/lib/rancher-data/local-catalogs/v2/rancher-partner-charts/8f17acdce9bffd6e05a58a3798840e408c4ea71783381ecd2e9af30baad65974/.git
    Updating files: 100% (2327/2327), done.
    Your branch is up to date with ‘origin/main’.
    /var/lib/rancher
    2025/12/03 01:30:04 [INFO] Rancher version v2.13.0 (f94ac947f75e312f1ab9217d21b2770b48b734c8) is starting
    2025/12/03 01:30:04 [INFO] Rancher arguments {ACMEDomains: AddLocal:true Embedded:false BindHost: HTTPListenPort:80 HTTPSListenPort:443 K8sMode:auto Debug:false Trace:false NoCACerts:true AuditLogPath:/var/log/auditlog/rancher-api-audit.log AuditLogMaxage:10 AuditLogMaxsize:100 AuditLogMaxbackup:10 AuditLogLevel:0 AuditLogEnabled:false Features: ClusterRegistry: AggregationRegistrationTimeout:5m0s}
    2025/12/03 01:30:04 [INFO] Listening on /tmp/log.sock
    2025/12/03 01:30:04 [INFO] Waiting for k3s to start
    2025/12/03 01:30:05 [INFO] Waiting for k3s to start
    2025/12/03 01:30:06 [INFO] Waiting for k3s to start
    2025/12/03 01:30:07 [INFO] Waiting for k3s to start
    2025/12/03 01:30:08 [INFO] Waiting for k3s to start
    2025/12/03 01:30:09 [INFO] Waiting for k3s to start
    2025/12/03 01:30:10 [INFO] Waiting for k3s to start
    2025/12/03 01:30:11 [INFO] Waiting for k3s to start
    2025/12/03 01:30:12 [INFO] Waiting for server to become available: the server is currently unable to handle the request
    2025/12/03 01:30:14 [INFO] Waiting for server to become available: the server is currently unable to handle the request
    2025/12/03 01:30:16 [INFO] Waiting for server to become available: the server is currently unable to handle the request
    2025/12/03 01:30:18 [INFO] Waiting for server to become available: the server is currently unable to handle the request
    2025/12/03 01:30:20 [INFO] Waiting for server to become available: the server is currently unable to handle the request
    2025/12/03 01:30:22 [INFO] Waiting for server to become available: the server is currently unable to handle the request
    2025/12/03 01:30:29 [INFO] Running in single server mode, will not peer connections
    2025/12/03 01:30:29 [INFO] Scanning NodeTemplates in namespace: cattle-global-nt, group: nodetemplates.management.cattle.io
    2025/12/03 01:30:29 [INFO] Scanning ClusterTemplates in namespace: cattle-global-data, group: clustertemplates.management.cattle.io
    2025/12/03 01:30:29 [INFO] [deferred-capi - WaitForClient] waiting for CAPI CRDs to be established…
    2025/12/03 01:30:29 [INFO] [deferred-ext] WaitForClient starting waiter for EXT api-service availability
    I1203 01:30:29.663478 43 warnings.go:110] “Warning: v1 Endpoints is deprecated in v1.33+; use discovery.k8s.io/v1 EndpointSlice”
    I1203 01:30:29.666151 43 warnings.go:110] “Warning: v1 Endpoints is deprecated in v1.33+; use discovery.k8s.io/v1 EndpointSlice”
    I1203 01:30:29.668138 43 warnings.go:110] “Warning: v1 Endpoints is deprecated in v1.33+; use discovery.k8s.io/v1 EndpointSlice”
    2025/12/03 01:30:29 [INFO] Applying CRD features.management.cattle.io
    2025/12/03 01:30:29 [INFO] Waiting for CRD features.management.cattle.io to become available
    2025/12/03 01:30:30 [INFO] Done waiting for CRD features.management.cattle.io to become available
    2025/12/03 01:30:30 [FATAL] k3s exited with: exit status 1
    [root@master ~]#
    [root@master ~]# docker run -itd --name=rancher --restart=unless-stopped -p 80:80 -p 443:443 --privileged rancher/rancher:v2.13.0 --no-cacerts
    a4b790c3dbe8b7be8551d401fd31e04ec125400bd096e2d3723f5da58847ef16
    [root@master ~]# docker logs -f rancher
    Restoring git repositories:
  • /var/lib/rancher-data/local-catalogs/v2/rancher-charts/4b40cac650031b74776e87c1a726b0484d0877c3ec137da0872547ff9b73a721/.git
    Updating files: 100% (48591/48591), done.
    Your branch is up to date with ‘origin/release-v2.13’.
    /var/lib/rancher
  • /var/lib/rancher-data/local-catalogs/v2/rancher-rke2-charts/675f1b63a0a83905972dcab2794479ed599a6f41b86cd6193d69472d0fa889c9/.git
    Updating files: 100% (36759/36759), done.
    Your branch is up to date with ‘origin/main’.
    /var/lib/rancher
  • /var/lib/rancher-data/local-catalogs/v2/rancher-partner-charts/8f17acdce9bffd6e05a58a3798840e408c4ea71783381ecd2e9af30baad65974/.git
    Updating files: 100% (2327/2327), done.
    Your branch is up to date with ‘origin/main’.
    /var/lib/rancher
    2025/12/03 01:30:04 [INFO] Rancher version v2.13.0 (f94ac947f75e312f1ab9217d21b2770b48b734c8) is starting
    2025/12/03 01:30:04 [INFO] Rancher arguments {ACMEDomains: AddLocal:true Embedded:false BindHost: HTTPListenPort:80 HTTPSListenPort:443 K8sMode:auto Debug:false Trace:false NoCACerts:true AuditLogPath:/var/log/auditlog/rancher-api-audit.log AuditLogMaxage:10 AuditLogMaxsize:100 AuditLogMaxbackup:10 AuditLogLevel:0 AuditLogEnabled:false Features: ClusterRegistry: AggregationRegistrationTimeout:5m0s}
    2025/12/03 01:30:04 [INFO] Listening on /tmp/log.sock
    2025/12/03 01:30:04 [INFO] Waiting for k3s to start
    2025/12/03 01:30:05 [INFO] Waiting for k3s to start
    2025/12/03 01:30:06 [INFO] Waiting for k3s to start
    2025/12/03 01:30:07 [INFO] Waiting for k3s to start
    2025/12/03 01:30:08 [INFO] Waiting for k3s to start
    2025/12/03 01:30:09 [INFO] Waiting for k3s to start
    2025/12/03 01:30:10 [INFO] Waiting for k3s to start
    2025/12/03 01:30:11 [INFO] Waiting for k3s to start
    2025/12/03 01:30:12 [INFO] Waiting for server to become available: the server is currently unable to handle the request
    2025/12/03 01:30:14 [INFO] Waiting for server to become available: the server is currently unable to handle the request
    2025/12/03 01:30:16 [INFO] Waiting for server to become available: the server is currently unable to handle the request
    2025/12/03 01:30:18 [INFO] Waiting for server to become available: the server is currently unable to handle the request
    2025/12/03 01:30:20 [INFO] Waiting for server to become available: the server is currently unable to handle the request
    2025/12/03 01:30:22 [INFO] Waiting for server to become available: the server is currently unable to handle the request
    2025/12/03 01:30:29 [INFO] Running in single server mode, will not peer connections
    2025/12/03 01:30:29 [INFO] Scanning NodeTemplates in namespace: cattle-global-nt, group: nodetemplates.management.cattle.io
    2025/12/03 01:30:29 [INFO] Scanning ClusterTemplates in namespace: cattle-global-data, group: clustertemplates.management.cattle.io
    2025/12/03 01:30:29 [INFO] [deferred-capi - WaitForClient] waiting for CAPI CRDs to be established…
    2025/12/03 01:30:29 [INFO] [deferred-ext] WaitForClient starting waiter for EXT api-service availability
    I1203 01:30:29.663478 43 warnings.go:110] “Warning: v1 Endpoints is deprecated in v1.33+; use discovery.k8s.io/v1 EndpointSlice”
    I1203 01:30:29.666151 43 warnings.go:110] “Warning: v1 Endpoints is deprecated in v1.33+; use discovery.k8s.io/v1 EndpointSlice”
    I1203 01:30:29.668138 43 warnings.go:110] “Warning: v1 Endpoints is deprecated in v1.33+; use discovery.k8s.io/v1 EndpointSlice”
    2025/12/03 01:30:29 [INFO] Applying CRD features.management.cattle.io
    2025/12/03 01:30:29 [INFO] Waiting for CRD features.management.cattle.io to become available
    2025/12/03 01:30:30 [INFO] Done waiting for CRD features.management.cattle.io to become available
    2025/12/03 01:30:30 [FATAL] k3s exited with: exit status 1
    [root@master ~]#

这是最后的报错,也就是 rancher 容器内内置的 K3s 集群启动失败,所以得看k3s 的日志才能继续排查

docker run 启动的容器内置了一个 K3s 集群,要查看这个 K3s 的日志,需要你 restart rancher 容器,然后 exec 到容器内,查 k3s.log 的日志,直到容器崩溃。