Skip to content

Commit 9ee2e27

Browse files
authored
Update Kubernetes job page (#2973)
Adds a paragraph mentioning `restartPolicy` needs to be set to `Never` for successful job completion. Signed-off-by: Renato L. de F. Cunha <[email protected]> Signed-off-by: Renato L. de F. Cunha <[email protected]>
1 parent 976dcab commit 9ee2e27

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

daprdocs/content/en/operations/hosting/kubernetes/kubernetes-job.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@ To address this issue the Dapr sidecar has an endpoint to `Shutdown` the sidecar
1414

1515
When running a basic [Kubernetes Job](https://kubernetes.io/docs/concepts/workloads/controllers/job/) you will need to call the `/shutdown` endpoint for the sidecar to gracefully stop and the job will be considered `Completed`.
1616

17-
When a job is finish without calling `Shutdown` your job will be in a `NotReady` state with only the `daprd` container running endlessly.
17+
When a job is finished without calling `Shutdown`, your job will be in a `NotReady` state with only the `daprd` container running endlessly.
1818

19-
Be sure and use the *POST* HTTP verb when calling the shutdown API.
19+
Stopping the dapr sidecar will cause its readiness and liveness probes to fail in your container because the dapr sidecar was shutdown.
20+
To prevent Kubernetes from trying to restart your job, set your job's `restartPolicy` to `Never`.
21+
22+
Be sure to use the *POST* HTTP verb when calling the shutdown HTTP API.
2023

2124
```yaml
2225
apiVersion: batch/v1
@@ -37,7 +40,7 @@ spec:
3740
restartPolicy: Never
3841
```
3942
40-
You can also call the `Shutdown` from any of the Dapr SDK
43+
You can also call the `Shutdown` from any of the Dapr SDKs
4144

4245
```go
4346
package main

0 commit comments

Comments
 (0)