Skip to content

Commit 91975d6

Browse files
committed
edits
1 parent 36678a5 commit 91975d6

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

articles/container-instances/container-instances-liveness-probe.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ az container create --resource-group myResourceGroup --name livenesstest -f live
5757

5858
### Start command
5959

60-
The deployment includes a `command` property that defines a starting command that runs when the container first starts running. This property accepts an array of strings. In this example, it starts a bash session and creates a file called `healthy` within the `/tmp` directory by passing this command:
60+
The deployment includes a `command` property defining a starting command that runs when the container first starts running. This property accepts an array of strings. This command simulates the container entering an unhealthy state.
61+
62+
First, it starts a bash session and creates a file called `healthy` within the `/tmp` directory. It then sleeps for 30 seconds before deleting the file, then enters a 10-minute sleep:
6163

6264
```bash
6365
/bin/sh -c "touch /tmp/healthy; sleep 30; rm -rf /tmp/healthy; sleep 600"
6466
```
6567

66-
It then sleeps for 30 seconds before deleting the file, then enters a 10-minute sleep.
67-
6868
### Liveness command
6969

7070
This deployment defines a `livenessProbe` that supports an `exec` liveness command that acts as the liveness check. If this command exits with a non-zero value, the container is killed and restarted, signaling the `healthy` file could not be found. If this command exits successfully with exit code 0, no action is taken.

articles/container-instances/container-instances-readiness-probe.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ type: Microsoft.ContainerInstance/containerGroups
5858
5959
### Start command
6060
61-
The deployment includes a `command` property that defines a starting command that runs when the container first starts running. This property accepts an array of strings. This command simulates a time when the web app runs but the container isn't ready. First, it starts a shell session and runs a `node` command to start the web app. It also starts a command to sleep for 240 seconds, after which it creates a file called `ready` within the `/tmp` directory:
61+
The deployment includes a `command` property defining a starting command that runs when the container first starts running. This property accepts an array of strings. This command simulates a time when the web app runs but the container isn't ready.
62+
63+
First, it starts a shell session and runs a `node` command to start the web app. It also starts a command to sleep for 240 seconds, after which it creates a file called `ready` within the `/tmp` directory:
6264

6365
```console
6466
node /usr/src/app/index.js & (sleep 240; touch /tmp/ready); wait

0 commit comments

Comments
 (0)