Here are some frequently used configurations.
- Set some action before the pod is stopped
lifecycle:
preStop:
exec:
command:
- sleep
- '10'
- Health check when pod is starting
readinessProbe:
failureThreshold: 3
httpGet:
path: /ping
port: 8000
scheme: HTTP
initialDelaySeconds: 3
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
- Set the minimum resources and maximum resources limits
resources:
limits:
cpu: '4'
memory: 8Gi
requests:
cpu: 250m