Ubuntu 22.04 docker 安装 rancher 不成功

Rancher Server 设置

  • Rancher 版本:latest 或 2.5.12
  • 安装选项 (Docker install):
    docker run -d --restart=unless-stopped
    -p 80:80 -p 443:443
    -v /etc/ssl/xxx.cn.pem:/etc/rancher/ssl/cert.pem
    -v /etc/ssl/xxxx.cn.key:/etc/rancher/ssl/key.pem
    –privileged
    rancher/rancher:latest
    –no-cacerts

问题描述:
ubuntu 22.04 docker 安装 rancher 不成功, container一直再重启

重现步骤:
ubuntu 22.04 docker 安装 rancher

结果:

预期结果:

截图:

其他上下文信息:

日志

2022/05/13 12:27:55 [FATAL] failed to list apiextensions.k8s.io/v1, Kind=CustomResourceDefinition for features.management.cattle.io: Get “https://127.0.0.1:6443/apis/apiextensions.k8s.io/v1/customresourcedefinitions?labelSelector=objectset.rio.cattle.io%!F(MISSING)hash%!D(MISSING)19ff819ffe8f91552ea341f9d8d82290c7113671&timeout=15m0s”: dial tcp 127.0.0.1:6443: connect: connection refused
Doing /etc/rancher/ssl
WARNING: key.pem does not contain a certificate or CRL: skipping
2022/05/13 12:28:14 [INFO] Rancher version v2.6.3 (3c1d5fac3) is starting
2022/05/13 12:28:14 [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 AuditLevel:0 Features: ClusterRegistry:}
2022/05/13 12:28:14 [INFO] Listening on /tmp/log.sock
2022/05/13 12:28:14 [INFO] Waiting for server to become available: Get “https://127.0.0.1:6443/version?timeout=15m0s”: dial tcp 127.0.0.1:6443: connect: connection refused
2022/05/13 12:28:16 [INFO] Waiting for server to become available: Get “https://127.0.0.1:6443/version?timeout=15m0s”: dial tcp 127.0.0.1:6443: connect: connection refused
2022/05/13 12:28:18 [INFO] Waiting for server to become available: Get “https://127.0.0.1:6443/version?timeout=15m0s”: dial tcp 127.0.0.1:6443: connect: connection refused
2022/05/13 12:28:20 [INFO] Waiting for server to become available: Get “https://127.0.0.1:6443/version?timeout=15m0s”: dial tcp 127.0.0.1:6443: connect: connection refused
2022/05/13 12:28:22 [INFO] Waiting for server to become available: an error on the server (“apiserver not ready”) has prevented the request from succeeding
2022/05/13 12:28:24 [INFO] Waiting for server to become available: an error on the server (“apiserver not ready”) has prevented the request from succeeding
2022/05/13 12:28:26 [INFO] Waiting for server to become available: an error on the server (“apiserver not ready”) has prevented the request from succeeding
2022/05/13 12:28:38 [INFO] Running in single server mode, will not peer connections

Docker Fail to install on Ubuntu 22.04 LTS · Issue #37225 · rancher/rancher · GitHub 这边有个类似的问题

Ubuntu 22.04 刚刚发布没多久,需要耐心等待一下,兼容上去是迟早的事。