KubernetesClient client = new DefaultKubernetesClient() Namespace ns = new NamespaceBuilder().withNewMetadata().withName("my_namespace").endMetadata().build(); client.namespaces().create(ns)