kubectl get deploy deploymentname -o yaml equivalent in Fabric8 client #4011
-
Hi Team, I've an existing deployment in my Kubernetes cluster. I want to read its deployment.yaml file from Kubernetes environment using fabric8 client.Functionality similar to this command - kubectl get deploy deploymentname -o yaml. Please help me to get its fabric8 Java client equivalent. Objective : I want to get deployment.yaml for a resource and save it with me , perform some experiments in the Kubernetes environment and after the experiments done,I want to revert back to previous deployment. So I need to have deployment.yaml handy to roll back the operation. Thanks and Regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Serialization.asYaml(client.deployments().withName("deploymentname").get()); |
Beta Was this translation helpful? Give feedback.
Serialization.asYaml(client.deployments().withName("deploymentname").get());