Skip to content
Openshift 1 min read

Force Delete a Project (Namespace) in OpenShift

Force Delete a Project (Namespace) in OpenShift

Leia este artigo em português.

In some situations, a Project in OpenShift may get stuck in the Terminating state, preventing its complete removal. This usually happens due to Finalizers or pending resources within the namespace. If you’ve tried deleting a namespace and it hasn’t been removed, don’t worry—I’ve prepared a complete guide along with a script that automates the process.

The Problem

Normally, deleting a namespace in OpenShift is a simple process:

oc delete namespace <meu-namespace>

However, in some cases, the namespace may remain in the Terminating state indefinitely. This typically occurs because pending resources within the namespace are blocking its removal.

Solution: Forcing Deletion

If the namespace is stuck, we can force its removal using a script I’ve developed, which is available in my repository.

🔗 Force Namespace Deletion in OpenShift

If this content was helpful, consider leaving a ⭐ on the repository!


💡 Who am I?

I’m Gabriel Carmo, a CNCF Kubestronaut holding the CKA, CKAD, CKS, KCNA, and KCSA certifications, as well as Red Hat Certified OpenShift Administrator.

I work in DevOps Engineering, building and evolving multi-cloud Kubernetes platforms. My work focuses on reducing engineering teams’ cognitive load through platform engineering, automation, GitOps, and self-service experiences.

In my daily work, I connect infrastructure as code, cloud networking, governance, security, observability, and SRE practices to build more standardized, resilient, and operable platforms.

LinkedIn | GitHub | GitLab | Credly | E-mail