Clone Kubernetes objects programmatically using the Python API
问题 The Python API is available to read objects from a cluster. By cloning we can say: Get a copy of an existing Kubernetes object using kubectl get Change the properties of the object Apply the new object Until recently, the option to --export api was deprecated in 1.14. How can we use the Python Kubernetes API to do the steps from 1-3 described above? There are multiple questions about how to extract the code from Python API to YAML, but it's unclear how to transform the Kubernetes API object.