Simple question. I am using KubernetesClient by Fabric8. How do I get the deployment name by namespace? I tried
DeploymentList list = client.extensions().deployments().inNamespace(namespace).list();
I cannot get the name from it.. Any code snippet to get name by namespace will be great.
Try :
DeploymentList list = client.extensions().deployments().inNamespace(namespace).list();
for (Deployment d : list.getItems()) {
System.out.println(d.getMetadata().getName());
}