Dapr
This document provides a quick reference for managing and upgrading Dapr within a Kubernetes cluster.
Documentation
Section titled “Documentation”For complete documentation, visit the official Dapr website:
mTLS Certificate Management
Section titled “mTLS Certificate Management”Dapr uses mutual TLS (mTLS) to secure communication between services.
For guidance on updating or rotating certificates, refer to the official documentation:
Upgrade to Dapr v1.11.1
Section titled “Upgrade to Dapr v1.11.1”Before upgrading Dapr to v1.11.1, update the Custom Resource Definitions (CRDs). This ensures compatibility with the new release.
Update CRDs
Section titled “Update CRDs”Execute the following commands:
kubectl replace -f https://raw.githubusercontent.com/dapr/dapr/v1.11.1/charts/dapr/crds/components.yamlkubectl replace -f https://raw.githubusercontent.com/dapr/dapr/v1.11.1/charts/dapr/crds/configuration.yamlkubectl replace -f https://raw.githubusercontent.com/dapr/dapr/v1.11.1/charts/dapr/crds/subscription.yamlkubectl apply -f https://raw.githubusercontent.com/dapr/dapr/v1.11.1/charts/dapr/crds/resiliency.yamlkubectl apply -f https://raw.githubusercontent.com/dapr/dapr/v1.11.1/charts/dapr/crds/httpendpoints.yamlVerify the Upgrade
Section titled “Verify the Upgrade”After upgrading, verify that all Dapr components are running successfully:
kubectl get pods -n dapr-systemYou can also confirm the installed version:
dapr --versionConfirguation Example
Section titled “Confirguation Example”kubectl apply -n inma -f - <<EOFapiVersion: dapr.io/v1alpha1kind: Configurationmetadata: name: default-app-configspec: features: - name: Resiliency enabled: true metric: enabled: true mtls: allowedClockSkew: 15m enabled: true workloadCertTTL: 24hEOFResiliency Example
Section titled “Resiliency Example”apiVersion: dapr.io/v1alpha1kind: Resiliencymetadata: name: default-resiliencyscopes:spec: policies: retries: general: policy: constant duration: 3s maxRetries: 5 targets: components: integration-crm-pubsub: inbound: retry: general outbound: retry: generalDelete Component
Section titled “Delete Component”kubectl delete component.dapr.io component-nameComponents
Section titled “Components”Kafka Component
Section titled “Kafka Component”kubectl apply -n inma -f - <<EOFapiVersion: dapr.io/v1alpha1kind: Componentmetadata: name: integration-business-pubsub namespace: inmaspec: type: pubsub.kafka version: v1 metadata: - name: brokers value: "inma-kafka-cluster-kafka-bootstrap.inma-kafka.svc.cluster.local:9092" - name: consumerGroup value: "integration-business" - name: clientID value: "integration-business" - name: authType value: "none" - name: disableTls value: true - name: consumeRetryInterval value: 200ms - name: maxMessageBytes # Optional. value: 20971520 - name: version value: 3.0.0EOFValmet Component
Section titled “Valmet Component”apiVersion: dapr.io/v1alpha1kind: Componentmetadata: name: integration-production-valmet-pubsub namespace: inmaspec: type: pubsub.kafka version: v1 metadata: - name: brokers value: inma-kafka-cluster-kafka-bootstrap.inma-kafka.svc.cluster.local:9092 - name: consumerGroup value: integration-production-valmet - name: clientID value: integration-production-valmet - name: authType value: none - name: disableTls value: true - name: consumeRetryInterval value: 200ms - name: maxMessageBytes value: 20971520 - name: version value: 3.0.0ABB Component
Section titled “ABB Component”apiVersion: dapr.io/v1alpha1kind: Componentmetadata: name: integration-production-abb-pubsub namespace: inmaspec: type: pubsub.kafka version: v1 metadata: - name: brokers value: inma-kafka-cluster-kafka-bootstrap.inma-kafka.svc.cluster.local:9092 - name: consumerGroup value: integration-production-abb - name: clientID value: integration-production-abb - name: authType value: none - name: disableTls value: true - name: consumeRetryInterval value: 200ms - name: maxMessageBytes value: 20971520 - name: version value: 3.0.0Customer Portal Component
Section titled “Customer Portal Component”apiVersion: dapr.io/v1alpha1kind: Componentmetadata: name: customer-portal-pubsub namespace: inmaspec: type: pubsub.kafka version: v1 metadata: - name: brokers value: inma-kafka-cluster-kafka-bootstrap.inma-kafka.svc.cluster.local:9092 - name: consumerGroup value: customer-portal - name: clientID value: customer-portal - name: authType value: none - name: disableTls value: true - name: consumeRetryInterval value: 200ms - name: maxMessageBytes value: 20971520 - name: version value: 3.0.0