๐ŸŽฏ ืžื˜ืจืช ื”ืชืจื’ื•ืœ

ื‘ืžืขื‘ื“ื” ื–ื• ื ืจืื” ืืช ื”ื”ื‘ื“ืœ ื”ืงืจื™ื˜ื™ ืฉืœ Readiness Probe:

ื ืขื‘ื•ื“ ืขื:


ื—ืœืง 1 โ€” ื™ืฆื™ืจืช Deployment

ื ื™ืฆื•ืจ ืชื™ืงื™ื™ื” readiness-probes ื•ื ื™ืฆื•ืจ ืงื•ื‘ืฅ:

vi api-deployment.yaml

ื”ื“ื‘ืง:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: color-api
spec:
  replicas: 6
  selector:
    matchLabels:
      app: color-api
  template:
    metadata:
      labels:
        app: color-api
    spec:
      containers:
        - name: color-api
          image: lironefitoussi/color-api:1.2.1
          ports:
            - containerPort: 80
          resources:
            limits:
              cpu: "500m"
              memory: 512Mi
          env:
            - name: DELAY_STARTUP
              value: "false"
            - name: FAIL_LIVENESS
              value: "false"
            - name: FAIL_READINESS
              value: "true"
          startupProbe:
            httpGet:
              path: /up
              port: 80
            failureThreshold: 2
            periodSeconds: 3
          readinessProbe:
            httpGet:
              path: /ready
              port: 80
            failureThreshold: 2
            periodSeconds: 5

๐Ÿ”Ž ืžื” ืงื•ืจื” ื›ืืŸ?