Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
1.2 kB
1
Indexable
Never
apiVersion: apps/v1
kind: Deployment
metadata:
  name: fastapi-deployment
  labels:
    app: fastapi-app
spec:
  replicas: 3
  selector:
    matchLabels:
      app: fastapi
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: fast-api
    spec:
      containers:
      - name: fastapi
        image: fastapi:1.0
        resources:
          requests:
            cpu: 100m
            memory: 2048
          limits:
            cpu: 10m
            memory: 1024
        livenessProbe:
          httpGet:
            path: /health
            port: 8000
          initialDelaySeconds: 15
          timeoutSeconds: 30
        readinessProbe:
          httpGet:
            path: /health
            port: 8080
          initialDelaySeconds: 15
          timeoutSeconds: 30
        startupProbe:
          httpGet:
            path: /health
            port: 8000
          initialDelaySeconds: 15
          timeoutSeconds: 30
      - name: postgres
        image: postgres:latest
        resources:
          requests:
            cpu: 1
            memory: 64Mi
          limits:
            cpu: 1
            memory: 64Mi