[Kubernetes] ConfigurationYAML

[Kubernetes] ConfigurationYAML

  • Kubernetes Configuration YAML
    • Kubernetes configuration file (YAML or JSON)
    • Each file contains one or more manifests
    • Each manifest describes on API object (deployment, job, secret)
    • Each manifest needs four parts (root key:values in the file)
      • apiVersion:
      • kind:
      • metadata:
      • spec:
  • Building Your YAML FIles
    • ​kind: We can get a list of resources the cluster supports
      • kubectl api-resources
    • Notice some resources have multiple API's (old vs. new)
    • apiVersion: We can get the API versions the cluster supports
      • kubectl api-versions
    • 提醒:在開始寫yaml之前必須決定要用何種資源(kind)、哪種版本(apiVersion)
    • metadata: only name is required
    • spec: Where all the action is at!