# A trivially small HTTP service the app's "downstream" health indicator calls. Scale it to zero to # simulate a dependency outage: kubectl -n demo scale deploy/downstream --replicas=0 apiVersion: apps/v1 kind: Deployment metadata: name: downstream namespace: demo spec: replicas: 1 selector: matchLabels: {app: downstream} template: metadata: labels: {app: downstream} spec: # busybox httpd runs as PID 1 and ignores SIGTERM, so without this a scale-to-zero leaves the # "outage" serving for the full 30 s grace period. terminationGracePeriodSeconds: 2 containers: - name: httpd image: busybox:1.37 imagePullPolicy: Never command: ["sh", "-c", "mkdir -p /www && echo ok > /www/index.html && exec httpd -f -p 8080 -h /www"] ports: [{containerPort: 8080}] --- apiVersion: v1 kind: Service metadata: name: downstream namespace: demo spec: selector: {app: downstream} ports: [{port: 8080, targetPort: 8080}]