Home > Mobile >  Skuber delete items in a specific namespace
Skuber delete items in a specific namespace

Time:04-21

I am using skuber 2.4.0.

Is there a way to use the skuber client.delete an object in a specific namespace?

I understand that when I create a client I can specify a namespace. But for example when creating a job you can specify any namespace in the metadata.

Seems weird to need to create a new client just for deletion.

CodePudding user response:

I suggest you open an issue in the github repo for further help. https://github.com/hagay3/skuber/issues

Regarding your question, you can use the following method:

def usingNamespace(newNamespace: String): KubernetesClient

https://github.com/hagay3/skuber/blob/master/client/src/main/scala/skuber/api/client/KubernetesClient.scala#L366

example: https://github.com/hagay3/skuber/blob/master/client/src/it/scala/skuber/NamespaceSpec.scala#L39

  • Related