Skip to content

DeleteNamespacedAsync hangs indefinitely #1631

@justinmchase

Description

@justinmchase

Describe the bug
I am awaiting await generic.DeleteNamespacedAsync<T>(...) but it never returns.

Kubernetes C# SDK Client Version
16.0.7

Server Kubernetes Version
1.30.5

Dotnet Runtime Version
net8

To Reproduce

  1. Follow the CRD example app
  2. Create an instance of the CR in a namespace
  3. Delete it from the namespace
await generic.DeleteNamespacedAsync<CResource>(
  this.Namespace,
  tunnel.Metadata.Name,
  cancellationToken
);

Expected behavior

  1. The resource id deleted from kubernetes
  2. This method returns immediately after

KubeConfig
N/A

Where do you run your app with Kubernetes SDK (please complete the following information):

  • OS: Linux
  • Environment: container
  • Cloud: Docker Desktop

Additional context

I have a watcher going at the same time:

await foreach (var (eventType, resource) in generic.WatchNamespacedAsync<T>(this.Namespace, cancel: cancellationToken))

This is detecting the resource being deleted and it keeps operating fine without hanging, I can manually create and delete more resources in kube and this watcher responds as normal. I'm also calling a PatchNamespacedAsync<T> and that one returns fine, its specifically deletion thats appears to hang.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions