How do I use autoscaling effectively with Probes (liveness/readiness/startup)?

DevOps, autoscaling, liveness probe, readiness probe, startup probe, Kubernetes, effective scaling, application health checks
Learn how to use autoscaling effectively in your DevOps practices with liveness, readiness, and startup probes to ensure your applications are healthy and responsive.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-app
spec:
  replicas: 3
  selector:
    matchLabels:
      app: my-app
  template:
    metadata:
      labels:
        app: my-app
    spec:
      containers:
      - name: my-app-container
        image: my-app-image:latest
        ports:
        - containerPort: 80
        livenessProbe:
          httpGet:
            path: /health
            port: 80
          initialDelaySeconds: 30
          periodSeconds: 10
        readinessProbe:
          httpGet:
            path: /ready
            port: 80
          initialDelaySeconds: 5
          periodSeconds: 10
        startupProbe:
          httpGet:
            path: /startup
            port: 80
          initialDelaySeconds: 60
          periodSeconds: 10
    

DevOps autoscaling liveness probe readiness probe startup probe Kubernetes effective scaling application health checks