Spring Boot Tutorial 0/110 lessons ~6 min read Lesson 75

    Kubernetes Basics

    Kubernetes orchestrates containers across machines: scheduling, scaling, healing, networking, config.

    Course progress0%
    Focus
    2 guided sections
    Practice signal
    Examples included
    Career prep
    Foundation builder

    Introduction

    Kubernetes orchestrates containers across machines: scheduling, scaling, healing, networking, config. The minimum knowledge for a backend engineer: Deployment, Service, ConfigMap, Secret, Ingress.

    Informative example

    bash
    apiVersion: apps/v1
    kind: Deployment
    metadata: { name: orders }
    spec:
    replicas: 3
    selector: { matchLabels: { app: orders } }
    template:
    metadata: { labels: { app: orders } }
    spec:
    containers:
    - name: app
    image: acme/orders:1.0.0
    ports: [{ containerPort: 8080 }]
    env:
    - name: SPRING_PROFILES_ACTIVE
    value: prod
    - name: DB_PASSWORD
    valueFrom: { secretKeyRef: { name: orders-secrets, key: db-password } }
    readinessProbe:
    httpGet: { path: /actuator/health/readiness, port: 8080 }
    livenessProbe:
    httpGet: { path: /actuator/health/liveness, port: 8080 }
    ---
    apiVersion: v1
    kind: Service
    metadata: { name: orders }
    spec:
    selector: { app: orders }
    ports: [{ port: 80, targetPort: 8080 }]
    Ready to mark this lesson complete?Track your journey across the entire course.