concept
Kubernetes object structure
Kubernetes objects identify their API type with apiVersion and kind, and use metadata for identity and descriptive fields. Many resource types have spec for desired configuration and status for observed state. Server-assigned identity and observed status are not normal desired-state inputs.
Formal Syntax & Structure
kubernetes syntaxkubernetes
Kubernetes object structureWorking Example
Example Snippetkubernetes
apiVersion: v1kind: Podmetadata: name: catalog-demo namespace: book-lab labels: app: catalog annotations: example.com/revision: "2"spec: restartPolicy: Never automountServiceAccountToken: false containers: - name: catalog image: example.invalid/catalog:1 resources: requests: cpu: 50m memory: 32Mi limits: cpu: 100m memory: 64Mi