Yaml templates in Kubernetes

12,832

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

Share:
12,832
DenCowboy
Author by

DenCowboy

Updated on September 15, 2022

Comments

  • DenCowboy
    DenCowboy over 1 year

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