Docker and Kubernetes

Master containerization with Docker and orchestration with Kubernetes.

advanced DevOps & Deployment 6 hours

Chapter 10: Kubernetes Pods and Deployments

Chapter 10 of 15

Chapter 10: Kubernetes Pods and Deployments

10.1 Pods

Pods are the smallest deployable units in Kubernetes.

apiVersion: v1
kind: Pod
metadata:
  name: my-pod
spec:
  containers:
  - name: app
    image: nginx:latest

10.2 Deployments

Deployments manage Pod replicas and updates.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-deployment
spec:
  replicas: 3
  selector:
    matchLabels:
      app: myapp
  template:
    metadata:
      labels:
        app: myapp
    spec:
      containers:
      - name: app
        image: nginx:latest