DevOps Classroom notes 07/Jul/2025

Writing Manifests

YAML

  • This a file format for representing data which uses name value or key value pairs as a basic structure.
  • YAML files generally have an extension of .yml or .yaml
  • Basic structure
name-1: <value-1>
name-2: <value-2>
..
..
name-n: <value-n>
  • Types of data
    • Simple/Scalar
      • Text
      • number
      • boolean
    • Complex
      • object/map
      • array/list
  • Text
city: Hyderabad
city: 'Hyderabad'
city: "Hyderabad"
  • number
population: 11.3
  • boolean
metro: true
metro: yes
  • list or array
areas: ['Ameerpet', 'SRNagar']
areas:
- Ameerpet
- SR Nagar
areas:
  - Ameerpet
  - SR Nagar
  • object|map:
address:
  flatno: 601-b
  builing: nilgiri
  area: Ameerpet
  city: Hyderabad
  • YAML Tutorial

  • Generally YAML for a specific tool comes with a structure or schema
  • Lets create a structure for filling a product information in ecommerce website
  • create a yaml file based on following
name string
manufacturer: string
skus: sku array
gst: number (default: 18)

## sku 
name: string
description: string
price: number       
  • Lets create a sample yaml file
---
name: Sony PlayStation5 
manufacturer: Sony
skus:
  - name: Slim
    description: Slim
    price: 54990
  - name: Muscular
    description: Muscular
    price: 154990

Lets start writing pod manifests

  • Kubernetes Pods have containers
  • Any thing which you create in k8s is an object
  • Refer Here for k8s api reference
  • Refer Here for pod spec

Example 1: A pod with nginx container

  • Refer Here for the changes done
    Preview
  • API Server fills the status
    Preview
    Preview

Example 2: A pod with nginx container and alpine container

Example 3: A pod with alpine container without cmd

apiVersion: v1
kind: Pod
metadata:
  name: third
spec:
  containers:
    - name: alp
      image: alpine

Preview

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube