Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

249
Vistas
How to force delete resources in a non-existant namespace?

This question is a follow up of: How to list really all objects of a nonexistant namespace?

Long story short:

$ kubectl get namespaces
NAME              STATUS   AGE
argo              Active   27d
default           Active   27d
kube-node-lease   Active   27d
kube-public       Active   27d
kube-system       Active   27d

$ kubectl get eventbus -n argo-events
NAME      AGE
default   17h

$ kubectl get eventsource -n argo-events
NAME                  AGE
pubsub-event-source   14h

There are two resources in namespace argo-events which actually no longer exits because I deleted it and expected it to be gone with all resources in it. Obviously something didn't work as expected.

Now (after listing potentially more objects - first question) I want to really get rid of those resources because they seem to block a redeployment.

But this ...

$ kubectl delete eventbus default -n argo-events
eventbus.argoproj.io "default" deleted
^C
$ kubectl delete eventsource pubsub-event-source -n argo-events
eventsource.argoproj.io "pubsub-event-source" deleted
^C

... doesn't work.

So, how do I force their deletion?


UPDATE:

$ kubectl describe eventbus default -n argo-events | grep -A 3 final
        f:finalizers:
          .:
          v:"eventbus-controller":
      f:status:
$ kubectl describe eventsource pubsub-event-source -n argo-events | grep -A 3 final
        f:finalizers:
          .:
          v:"eventsource-controller":
      f:spec:
over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

This worked:

$ kubectl create namespace argo-events
namespace/argo-events created

$ kubectl patch eventsource/pubsub-event-source -p '{"metadata":{"finalizers":[]}}' --type=merge -n argo-events
eventsource.argoproj.io/pubsub-event-source patched

$ kubectl patch eventbus/default -p '{"metadata":{"finalizers":[]}}' --type=merge -n argo-events
eventbus.argoproj.io/default patched

$ kubectl delete namespace argo-events
namespace "argo-events" deleted

If somebody stumbles upon this answer and knows why this works - please add an explanation in a comment. That would be cool, thanks.

over 4 years ago · Santiago Trujillo Denunciar

0

What about:

kubectl delete eventsource pubsub-event-source -n argo-events --grace-period=0 --force

?

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda