Let's start by looking at what kubectl run created for us, and work from there. We created the earlier simple deployments with the following commands:
kubectl run flask --image=quay.io/kubernetes-for-developers/flask:0.1.1 --port=5000
In the examples, we dumped the state of the declaration with the kubectl get deployment flask -o json command. Let's repeat that except using the -o yaml --export option:
kubectl get deployment flask -o yaml --export
The output should look something like the following:
apiVersion: extensions/v1beta1kind: Deploymentmetadata: annotations: deployment.kubernetes.io/revision: "1" creationTimestamp: null generation: 1 labels: run: flask name: flask selfLink: /apis/extensions/v1beta1/namespaces/default/deployments/flask ...