openshift project Terminaing处理


oc delete project kubevirt


# oc get project kubevirt
NAME                       DISPLAY NAME   STATUS
kubevirt                                  Terminating

显示 残留的有可能异常的 finalizer

# oc api-resources --verbs=list --namespaced -o name | xargs -n 1 oc get --show-kind --ignore-not-found -o jsonpath='{range .items[*]}{.kind}/{}: {.metadata.finalizers}{"\n"}{end}'
KubeVirt/kubevirt: [foregroundDeleteKubeVirt]


error: unable to retrieve the complete list of server APIs: the server is currently unable to handle the request

根据报错 APIs找到异常 apiservice 的全名,并删除

# kubectl get apiservice | grep ''    2020-08-29T15:05:38Z
# oc delete apiservice

清理 finalizers

# oc patch kubevirt/kubevirt --type=merge -p '{"metadata": {"finalizers":null}}' patched

Last updated