This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.10.6.3. 使用安全或不安全连接
安全连接是首选和推荐的方法。它通过 HTTPS 协议来进行,并且会强制验证证书。若有可能,prune 命令始终会尝试使用这种连接。如果不可能,某些情况下会回退到不安全连接,而这存在危险。这时,会跳过证书验证或使用普通 HTTP 协议。
除非指定了 --certificate-authority,否则以下情形中允许回退到不安全连接:
-
使用
--force-insecure选项运行prune命令。 -
提供的
registry-url带有http://架构前缀。 -
提供的
registry-url是本地链路地址或localhost。 -
当前用户的配置允许不安全连接。造成的原因可能是用户使用
--insecure-skip-tls-verify登录或在提示时选择不安全连接。
重要
如果 registry 使用有别于 OpenShift Container Platform 所用的证书颁发机构进行保护,则必须通过 --certificate-authority 标志来指定。否则,prune 命令会出错。