Running Dapr with a Kubernetes Job
Kubernetes Job
The Dapr sidecar is designed to be a long running process, in the context of a Kubernetes Job this behaviour can block your job completion. To address this issue the Dapr sidecar has an endpoint to the sidecar.
When a job is finish without calling Shutdown
your job will be in a NotReady
state with only the daprd
container running endlessly.
You can also call the Shutdown
from any of the Dapr SDK
package main
import (
"context"
"log"
dapr "github.com/dapr/go-sdk/client"
)
func main() {
client, err := dapr.NewClient()
log.Panic(err)
}
defer client.Close()
defer client.Shutdown()
}