1.12. OpenShift Container Platform 版本 3.11 集群导入失败的故障排除
1.12.1. 症状:OpenShift Container Platform 版本 3.11 集群导入失败
试图导入 Red Hat OpenShift Container Platform 版本 3.11 集群后,导入会失败,并显示类似以下内容的日志消息:
customresourcedefinition.apiextensions.k8s.io/klusterlets.operator.open-cluster-management.io configured clusterrole.rbac.authorization.k8s.io/klusterlet configured clusterrole.rbac.authorization.k8s.io/open-cluster-management:klusterlet-admin-aggregate-clusterrole configured clusterrolebinding.rbac.authorization.k8s.io/klusterlet configured namespace/open-cluster-management-agent configured secret/open-cluster-management-image-pull-credentials unchanged serviceaccount/klusterlet configured deployment.apps/klusterlet unchanged klusterlet.operator.open-cluster-management.io/klusterlet configured Error from server (BadRequest): error when creating "STDIN": Secret in version "v1" cannot be handled as a Secret: v1.Secret.ObjectMeta: v1.ObjectMeta.TypeMeta: Kind: Data: decode base64: illegal base64 data at input byte 1313, error found in #10 byte of ...|dhruy45="},"kind":"|..., bigger context ...|tye56u56u568yuo7i67i67i67o556574i"},"kind":"Secret","metadata":{"annotations":{"kube|...
1.12.2. 鉴别问题: OpenShift Container Platform 版本 3.11 集群导入失败
这通常是因为安装的 kubectl
命令行工具的版本为 1.11 或更早版本。运行以下命令,以查看您正在运行的 kubectl
命令行工具的版本:
kubectl version
如果返回的数据列出了 1.11 或更早版本,按照解决问题:OpenShift Container Platform 版本 3.11 集群导入失败中的内容进行解决。
1.12.3. 解决问题: OpenShift Container Platform 版本 3.11 集群导入失败
您可以通过完成以下步骤之一解决这个问题:
安装
kubectl
命令行工具的最新版本。-
下载
kubectl
工具的最新版本:参阅 Kubernetes 文档中的安装和设置 kubectl。 -
升级
kubectl
工具后再次导入集群。
-
下载
运行包含导入命令的文件。
- 根据使用 CLI 导入受管集群进行操作。
-
在创建用于导入集群的命令时,将该命令复制到名为
import.yaml
的 YAML 文件中。 运行以下命令从文件中再次导入集群:
oc apply -f import.yaml