General Availability of the Dapr Extension
Published Jun 07 2022 08:00 AM 3,522 Views
Microsoft

We are excited to announce General Availability of the Dapr extension for Arc-enabled Kubernetes clusters alongside AKS.

 

Distributed Application Runtime (Dapr) is a set of incrementally adoptable APIs that ease the implementation of common cloud-native patterns found in microservice applications. By leveraging the benefits of a sidecar architecture, Dapr helps developers tackle the challenges of building microservices while keeping code platform-agnostic. Dapr APIs, also referred to as building blocks: 

  • Seamlessly fit with your preferred language or framework 
  • Allow you to use one, several, or all the building blocks, depending on your needs 
  • Are built on best practice industry standards

For example, you can enable Dapr on your application to provide intercommunication through messaging via the Pub/Sub API, or reliable and secure service-to-service calls via the Service Invocation API. The below image depicts the various Dapr building blocks your microservices can leverage.

 

greeniemsft_0-1653517660576.png

 

The Dapr extension provisions Dapr on your Arc-enabled Kubernetes clusters, eliminating the overhead of downloading any Dapr tooling or manually installing and managing the Dapr runtime on your cluster.

 

After writing Dapr into your application (in this example, using the Dapr .NET SDK to publish a message to a topic):

 

using var client = new DaprClientBuilder().Build();

await client.PublishEventAsync("order_pub_sub", "orders", order);

 

You can use the az k8s-extension CLI to install the Dapr control plane on your Arc-enabled Kubernetes clusters. The same Azure CLI commands are used to managed Dapr on AKS clusters. For AKS, swamp out the --cluster-type value of connectedClusters with managedClusters. Use the following command in the Azure CLI:

 

az k8s-extension create --extension-type Microsoft.Dapr \ 
--cluster-type connectedClusters \ 
--cluster-name myCluster \ 
--resource-group myResourceGroup \
--name myDaprExtension

 

The extension offers a fully supported version of Dapr and integrates with all native Dapr configuration capabilities through simple command-line arguments. For example, to provision Dapr with high availability (HA) enabled, set the global.ha.enabled parameter to ‘true’:

 

--configuration-settings "global.ha.enabled=true"

 

The extension platform provides the ability to set auto-upgrades for the Dapr control plane, making it easy for you to align to the latest minor version of Dapr. Specify the --auto-upgrade-minor-version parameter and setting the value to 'true':

 

--auto-upgrade-minor-version true

 

Once the extension is installed, the Dapr control plane is created on your Arc-enabled Kubernetes cluster. Your application code, instrumented with Dapr, can immediately begin leveraging the Dapr APIs.

Try the Dapr extension sample on your Arc-enabled Kubernetes cluster. For more information, refer to the Dapr cluster extension documentation.

Co-Authors
Version history
Last update:
‎Jun 05 2022 09:42 AM
Updated by: