Score:0

How to find specific Kubernetes resource and "terminate/finalize" it when namespace deletion is stuck?

cn flag

Hi I tried to delete some namespaces and they are stuck in terminating...

From the below details, I tried to delete the supposed rolebindings and roles, but they won't delete either and I don't know where to find the resources for: wrangler.cattle.io/auth-prov-v2-rb and wrangler.cattle.io/auth-prov-v2-role

  conditions:
  - lastTransitionTime: "2023-08-09T21:30:18Z"
    message: All resources successfully discovered
    reason: ResourcesDiscovered
    status: "False"
    type: NamespaceDeletionDiscoveryFailure
  - lastTransitionTime: "2023-08-09T21:30:18Z"
    message: All legacy kube types successfully parsed
    reason: ParsedGroupVersions
    status: "False"
    type: NamespaceDeletionGroupVersionParsingFailure
  - lastTransitionTime: "2023-08-09T21:30:18Z"
    message: All content successfully deleted, may be waiting on finalization
    reason: ContentDeleted
    status: "False"
    type: NamespaceDeletionContentFailure
  - lastTransitionTime: "2023-08-09T21:30:18Z"
    message: 'Some resources are remaining: rolebindings.rbac.authorization.k8s.io
      has 2 resource instances, roles.rbac.authorization.k8s.io has 1 resource instances'
    reason: SomeResourcesRemain
    status: "True"
    type: NamespaceContentRemaining
  - lastTransitionTime: "2023-08-09T21:30:18Z"
    message: 'Some content in the namespace has finalizers remaining: wrangler.cattle.io/auth-prov-v2-rb
      in 2 resource instances, wrangler.cattle.io/auth-prov-v2-role in 1 resource
      instances'
    reason: SomeFinalizersRemain
    status: "True"
    type: NamespaceFinalizersRemaining
Score:1
cn flag

There was a bunch of resources: roles, role bindings (+cluster) and custom resources that all had finalizers, that wouldn't delete either. So I patched all those resources by removing the finalizer and everything started to finally delete itself.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.