failed to verify certificate: x509: certificate signed by unknown authority
rancher 版本 2.10.3
nginx rancher 启动命令 遵循
time=“2025-03-04T11:36:25Z” level=error msg=“Failed to register agent: registration failed: cannot create clusterregistration on management cluster for cluster id ‘bcpr2jxfxdqmm6rrps7scl6jmkkctfvqj8qcqvts6l282c8m52vwwb’: Post "https://xxxx.xxxx.com/apis/fleet.cattle.io/v1alpha1/namespaces/fleet-local/clusterregistrations\”: tls: failed to verify certificate: x509: certificate signed by unknown authority"
time="2025-03-05T02:25:52Z" level=warning msg="Cannot find fleet-agent secret, running registration"
time="2025-03-05T02:25:52Z" level=info msg="Creating clusterregistration with id '9sm54bf9jtr5bfhwwtqt6h7c7pbgjsjwzqv22djbwzh7ccxclml5mr' for new token"
time="2025-03-05T02:25:52Z" level=error msg="Failed to register agent: registration failed: cannot create clusterregistration on management cluster for cluster id '9sm54bf9jtr5bfhwwtqt6h7c7pbgjsjwzqv22djbwzh7ccxclml5mr': Post \"https://xxx.xxx.com/apis/fleet.cattle.io/v1alpha1/namespaces/fleet-local/clusterregistrations\": tls: failed to verify certificate: x509: failed to load system roots and no roots provided; readdirent /dev/null: not a directory"
time="2025-03-05T02:26:52Z" level=warning msg="Cannot find fleet-agent secret, running registration"
time="2025-03-05T02:26:52Z" level=info msg="Creating clusterregistration with id '9sm54bf9jtr5bfhwwtqt6h7c7pbgjsjwzqv22djbwzh7ccxclml5mr' for new token"
time="2025-03-05T02:26:56Z" level=error msg="Failed to register agent: registration failed: cannot create clusterregistration on management cluster for cluster id '9sm54bf9jtr5bfhwwtqt6h7c7pbgjsjwzqv22djbwzh7ccxclml5mr': Post \"https://xxx.xxx.com/apis/fleet.cattle.io/v1alpha1/namespaces/fleet-local/clusterregistrations\": tls: failed to verify certificate: x509: failed to load system roots and no roots provided; readdirent /dev/null: not a directory"
备注 这是 加了 --no-cacerts 参数的启动报错,如果不加 --no-cacerts,则会提示本提问中的错误,即certificate signed by unknown authority