背景
ArgoCD无法连接到k8s集群
 日志如下:
Failed to load live state: failed to get cluster info for "https://kubernetes.default.svc": error synchronizing cache state : failed to sync cluster https://10.233.0.1:443: failed to load initial state of resource InferenceService.serving.kserve.io: Internal error occurred: error resolving resource
解决过程
crd详细信息
Status:Accepted Names:Kind:       InferenceServiceList Kind:  InferenceServiceListPlural:     inferenceservicesShort Names:isvcSingular:  inferenceserviceConditions:Last Transition Time:  2024-04-28T13:39:36ZMessage:               no conflicts foundReason:                NoConflictsStatus:                TrueType:                  NamesAcceptedLast Transition Time:  2024-04-28T13:39:36ZMessage:               the initial names have been acceptedReason:                InitialNamesAcceptedStatus:                TrueType:                  EstablishedLast Transition Time:  2024-04-28T13:47:01ZMessage:               could not list instances: unable to find a custom resource client for inferenceservices.serving.kserve.io: unable to load root certificates: unable to parse bytes as PEM blockReason:                InstanceDeletionFailedStatus:                TrueType:                  TerminatingStored Versions:v1beta1
Events:  <none>
删除此crd资源
kubectl delete customresourcedefinitions.apiextensions.k8s.io inferenceservices.serving.kserve.io --force
warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.
customresourcedefinition.apiextensions.k8s.io "inferenceservices.serving.kserve.io" force deleted^C
发现无法正常删除,可通过patch进行清理kubectl patch crd inferenceservices.serving.kserve.io -p '{"metadata":{"finalizers":[]}}' --type=merge
customresourcedefinition.apiextensions.k8s.io/inferenceservices.serving.kserve.io patched