apiVersion: v1
kind: Service
metadata:
  name: liveness-http
  labels:
    app: liveness-http
spec:
  ports:
  - name: http
    port: 8001
  selector:
    app: liveness-http
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: liveness-http
spec:
  template:
    metadata:
      labels:
        app: liveness-http
        version: v1
    spec:
      containers:
      - name: liveness-http
        image: docker.io/istio/health:example
        ports:
        - containerPort: 8001
        livenessProbe:
          httpGet:
            path: /foo
            port: 8002
          initialDelaySeconds: 5
          periodSeconds: 5
