How to: Lab 12.3. Protect slow starting containers with startup probe
Sometimes, you have to deal with legacy applications that might require additional startup time on first initialization. In such cases, it can be tricky to set up _liveness probe_ without compromising the fast response to deadlocks that motivated such a probe. The trick is to set up a _startup probe_ with the same command, HTTP or TCP check, with a `failureThreshold * periodSeconds` long enough to cover the worse case startup time.

1. Using the official manifest files `pods/probe/http-liveness.yaml` as base, create a Deployment `myapp` manifest file as follows:
   - `nginx:1.22-alpine` image
   - 2 replicas
   - a _readiness probe_ that uses an HTTP GET request to check that the root endpoint `/` on port 80 returns a success status code
   - the _readiness probe_ should be initiated 3secs after container starts, and perform the checks every 5secs
   - a _liveness probe_ that uses an HTTP GET request to check that the root endpoint `/` on port 80 returns a success status code
   - the _liveness probe_ should be initiated 8secs after the container is ready, and perform checks every 6secs
   - a _startup probe_ with the same command as the _liveness probe_ but checks every 5secs up to a maximum of 3mins
2. Apply the manifest file to create the Deployment
3. View more details of the Deployment and confirm how all Probe configuration appear
4. List running Pods
5. View more details of one of the Pods and confirm how Probe configuration appear
6. Delete created resources
lab 12.3 solution
```sh
kubectl create deploy myapp --image=nginx:1.22-alpine --replicas=2 --dry-run=client -oyaml > lab12-3.yml
nano lab12-3.yml # add probes
```

```yaml
kind: Deployment
spec:
  template:
    spec:
      containers:
      - name: nginx
        readinessProbe:
          httpGet:
            path: /
            port: 80
          initialDelaySeconds: 3
          periodSeconds: 5
        livenessProbe:
          httpGet:
            path: /
            port: 80
          initialDelaySeconds: 8
          periodSeconds: 6
        startupProbe:
          httpGet:
            path: /
            port: 80
          periodSeconds: 5
          failureThreshold: 36 # 5secs x 36 = 3mins