验证

安装完成后、继续执行安装后任务之前,请验证 Core 和必需的 Aligned Extensions。这些检查适用于两种安装路径。如果 global 集群运行的是 Alauda OS,还需完成 Alauda OS 的其他检查。

前提条件

  • 安装已完成。
  • 您可以访问平台 Web UI 地址:在非 Alauda OS 上,该地址由安装程序显示;在 Alauda OS 上,该地址是在 console.globalHost 中设置的平台访问地址。
  • 您可以对新的 global 集群运行 kubectl:在非 Alauda OS 上,从安装节点运行;在 Alauda OS 上,使用新 global 集群的 kubeconfig 运行。在 Alauda OS 上,请在本页的命令中添加 --kubeconfig <global-kubeconfig>。

验证 Web UI 访问

安装完成后,打开平台 Web UI,并确认平台登录页面可以访问。在非 Alauda OS 上,安装程序会显示平台访问 URL;点击 访问 将其打开。在 Alauda OS 上,打开 https://<platform-access-address>,即在 console.globalHost 中设置的地址。

验证核心应用、扩展和 Pod

对新的 global 集群运行以下命令,以确认安装状态。在非 Alauda OS 上,请在控制平面节点上运行这些命令。

# All nodes are Ready
kubectl get nodes

# ClusterModule/global reports the base module as healthy
kubectl get clustermodule global -o jsonpath='{.status.phase}'

# No AppRelease is in a failed state
kubectl get apprelease -A

# Core and Aligned modules report their current phase and version
kubectl get moduleinfo -l cpaas.io/cluster-name=global

# No Pod is stuck outside Running or Completed
kubectl get pod --all-namespaces | awk '{if ($4 != "Running" && $4 != "Completed")print}' | awk -F'[/ ]+' '{if ($3 != $4)print}'

以下情况表明安装运行正常:

  • 所有 global 集群节点均处于 Ready 状态。
  • ClusterModule/global 报告的阶段状态正常。
  • 所有 AppRelease 均未处于失败状态。
  • 已安装以下应用,且对应的 ModuleInfo 资源在目标版本上报告 Running:
    • Alauda Container Platform Web Console
    • Alauda Container Platform Web Console Central
    • Alauda Container Platform Marketplace Web Console
    • Alauda Container Platform Application Catalog
    • Alauda Container Platform Observability Essentials
    • Alauda Container Platform Essentials
    • Alauda Container Platform Cluster Essentials
    • Alauda Container Platform GatewayAPI Plugin
  • cpaas-system 中的关键 Pod 处于 Running 或 Completed 状态。

在 Web Console 中,打开 管理员 > Marketplace > 集群插件,并确认所需应用均可用且未发生安装失败。

验证平台映像源

确认 ProductBase 记录了预期的平台映像源:

kubectl get productbase base \
  -o jsonpath='{.spec.registry.address}{"\t"}{.spec.registry.external}{"\n"}'

对于外部 registry,地址必须与准备好的 registry 匹配,且第二个值必须为 true。

对于需要身份验证的外部 registry,确认拉取 Secret 存在,但不要打印其内容:

kubectl -n cpaas-system get secret global-registry-auth

确认 global 集群记录了相同的 registry 地址:

kubectl -n cpaas-system get cluster global \
  -o jsonpath='{.metadata.annotations.cpaas\.io/registry-address}{"\n"}'

ProductBase 还包含可选或未安装 Extension 的目录条目。不要要求 ProductBase.status.artifacts 中的每个条目都为 Ready;无关的 Absent 条目本身并不表示安装失败。

确认所需的 Extension 目录条目存在,并且 Pod 未因映像拉取而受阻:

kubectl get moduleplugins

kubectl get pods --all-namespaces \
  | awk '$4 ~ /ImagePullBackOff|ErrImagePull/'

Pod 命令不应产生任何输出。安装验收依据是所需应用、其 ModuleInfo 和 AppRelease 状态,以及其运行中的 Pod。如果所需的已安装应用不可用,请参阅安装故障排除,以区分清单缺失与 DNS、路由、防火墙、CA 信任、拉取凭证或 registry 可用性问题。

Alauda OS 的其他检查

如果 global 集群运行 Alauda OS,还应使用新 global 集群的 kubeconfig 执行以下验证。在停用引导集群之前完成这些检查。

kubectl --kubeconfig <global-kubeconfig> get nodes
kubectl --kubeconfig <global-kubeconfig> get clusters.platform.tkestack.io global \
  -o jsonpath='{.status.phase}'
kubectl --kubeconfig <global-kubeconfig> get pods -n cpaas-system
kubectl --kubeconfig <global-kubeconfig> get clustermodule global

满足以下所有条件时,表示安装成功:

  • 安装程序进度 API 报告 status: Success 和 type: Complete。请参阅安装期间的信号。
  • 所有 global 集群节点均为 Ready。
  • cpaas-system 中的关键 Pod 为 Running 或 Completed。
  • ClusterModule/global 报告基础模块运行正常。

后续步骤

验证成功后,继续执行后续步骤。在 Alauda OS 上,先停用引导集群。