apiVersion: apps/v1
kind: Deployment
metadata:
name: billrun-worker
spec:
replicas: 1
selector:
matchLabels:
app: billrun-worker
template:
metadata:
labels:
app: billrun-worker
spec:
restartPolicy: Always
containers:
- name: billrun-worker
image: your-docker-registry/billrun-app:latest
command: ["php", "/billrun/public/index.php", "--env", "container", "--worker"]
resources:
limits:
memory: "2048Mi"
cpu: "1000m"
livenessProbe:
exec:
command: ["sh", "-c", "pgrep -f 'index.php --env container --worker'"]
initialDelaySeconds: 10
periodSeconds: 10
failureThreshold: 3
readinessProbe:
exec:
command: ["sh", "-c", "pgrep -f 'index.php --env container --worker'"]
initialDelaySeconds: 5
periodSeconds: 5
failureThreshold: 3
kubectl apply -f billrun-worker-deployment.yaml
kubectl logs -f deployment/billrun-worker