Yaml templates in Kubernetes

10/13/2016

Where can I find an official template which describes how to create your .yaml file to setup services/pods in Kubernetes?

-- DenCowboy
kubernetes
yaml

1 Answer

10/13/2016

You can find the specification for a pod here http://kubernetes.io/docs/api-reference/v1/definitions/#_v1_pod

A good starting point is also the examples https://github.com/kubernetes/kubernetes/tree/master/examples

Additional you can create the ressource via kubectl and export the resource to yaml

e.g. for a pod you can run this command:

kubectl run nginx --image=nginx kubectl get pods ngnix -o yaml > pod.yaml

-- Sebastian
Source: StackOverflow