DevOps Classroom notes 08/Jul/2025

Pods contd

Dealing with environmental variables

  • container
docker run -d --name mysqldb \
     -e MYSQL_ROOT_PASSWORD=qtdevops \
     -e MYSQL_DATABASE=nop \
     -e MYSQL_USER=qtdevops \
     -e MYSQL_PASSWORD=qtdevops \
     mysql:latest
  • Activity 4: lets try writing a manifest to create a mysql container in a Pod
---
apiVersion: v1
kind: Pod
metadata:
  name: forth
spec:
  containers:
    - name: mysql
      image: mysql:latest
      env:
        - name: MYSQL_ROOT_PASSWORD
          value: qtdevops
        - name: MYSQL_USER
          value: qtdevops
        - name: MYSQL_PASSWORD
          value: qtdevops
        - name: MYSQL_DATABASE
          value: nop

Preview

Dealing with commands or entrypoints

  • Certain containers we might need to pass a CMD
docker run -d --name test alpine sleep 1d
  • Lets try writing a manifest for this
---
apiVersion: v1
kind: Pod
metadata:
  name: fifth
spec:
  containers:
    - name: alp
      image: alpine
      args:
        - sleep
        - 1d

Resources in kuberntes

  • Refer Here for resources and limits
  • A pod With resources defined has an impact on QoS
---
apiVersion: v1
kind: Pod
metadata:
  name: second
spec:
  containers:
    - name: first
      image: nginx
    - name: second
      image: alpine
      command:
        - sleep
        - 1d

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