The documentation you are viewing is for Dapr v1.7 which is an older version of Dapr. For up-to-date documentation, see the latest version.
Dapr integrates with external resources to allow apps to both be triggered by external events and interact with the resources. Each binding component has a name and this name is used when interacting with the resource.
As with other building block components, binding components are extensible and can be found in the components-contrib repo.
A binding in Dapr is described using a
Component file with the following fields:
apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: <NAME> namespace: <NAMESPACE> spec: type: bindings.<NAME> version: v1 metadata: - name: <KEY> value: <VALUE> - name: <KEY> value: <VALUE> ...
The type of binding is determined by the
type field, and things like connection strings and other metadata are put in the
apiVersion: dapr.io/v1alpha1 kind: Component metadata: name: <NAME> namespace: <NAMESPACE> spec: type: bindings.azure.blobstorage version: v1 metadata: - name: storageAccount value: myStorageAccountName - name: storageAccessKey value: *********** - name: container value: container1 - name: decodeBase64 value: <bool> - name: getBlobRetryCount value: <integer>
一旦您创建了组件的 YAML 文件，按照以下说明来根据您的主机环境应用它：
若要在 Kubernetes 中部署，假定您的组件文件名为
kubectl apply -f mybinding.yaml
Visit the bindings reference for a full list of supported resources.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.