7.3. 使用自定义 DNS 访问托管集群进行故障排除
如果您在使用自定义 DNS 访问托管集群时遇到问题,请完成以下步骤。
流程
- 验证 DNS 记录是否已正确配置并解决。
输入以下命令检查自定义域的 TLS 证书是否有效,验证您的 SAN 是否正确:
oc get secret \ -n clusters <serving_certificate_name> \ -o jsonpath='{.data.tls\.crt}' | base64 \ -d |openssl x509 -text -noout -
$ oc get secret \ -n clusters <serving_certificate_name> \ -o jsonpath='{.data.tls\.crt}' | base64 \ -d |openssl x509 -text -noout -
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 确保到自定义域的网络连接正常工作。
在
HostedCluster
资源中,验证状态是否显示正确的自定义kubeconfig
信息,如下例所示:HostedCluster
状态示例status: customKubeconfig: name: sample-hosted-custom-admin-kubeconfig
status: customKubeconfig: name: sample-hosted-custom-admin-kubeconfig
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 输入以下命令检查
HostedControlPlane
命名空间中的kube-apiserver
日志:oc logs -n <hosted_control_plane_namespace> \ -l app=kube-apiserver -f -c kube-apiserver
$ oc logs -n <hosted_control_plane_namespace> \ -l app=kube-apiserver -f -c kube-apiserver
Copy to Clipboard Copied! Toggle word wrap Toggle overflow