Skip to content

Dapr

This document provides a quick reference for managing and upgrading Dapr within a Kubernetes cluster.


For complete documentation, visit the official Dapr website:


Dapr uses mutual TLS (mTLS) to secure communication between services.

For guidance on updating or rotating certificates, refer to the official documentation:


Before upgrading Dapr to v1.11.1, update the Custom Resource Definitions (CRDs). This ensures compatibility with the new release.

Execute the following commands:

Terminal window
kubectl replace -f https://raw.githubusercontent.com/dapr/dapr/v1.11.1/charts/dapr/crds/components.yaml
kubectl replace -f https://raw.githubusercontent.com/dapr/dapr/v1.11.1/charts/dapr/crds/configuration.yaml
kubectl replace -f https://raw.githubusercontent.com/dapr/dapr/v1.11.1/charts/dapr/crds/subscription.yaml
kubectl apply -f https://raw.githubusercontent.com/dapr/dapr/v1.11.1/charts/dapr/crds/resiliency.yaml
kubectl apply -f https://raw.githubusercontent.com/dapr/dapr/v1.11.1/charts/dapr/crds/httpendpoints.yaml

After upgrading, verify that all Dapr components are running successfully:

Terminal window
kubectl get pods -n dapr-system

You can also confirm the installed version:

Terminal window
dapr --version
kubectl apply -n inma -f - <<EOF
apiVersion: dapr.io/v1alpha1
kind: Configuration
metadata:
name: default-app-config
spec:
features:
- name: Resiliency
enabled: true
metric:
enabled: true
mtls:
allowedClockSkew: 15m
enabled: true
workloadCertTTL: 24h
EOF
apiVersion: dapr.io/v1alpha1
kind: Resiliency
metadata:
name: default-resiliency
scopes:
spec:
policies:
retries:
general:
policy: constant
duration: 3s
maxRetries: 5
targets:
components:
integration-crm-pubsub:
inbound:
retry: general
outbound:
retry: general
kubectl delete component.dapr.io component-name
kubectl apply -n inma -f - <<EOF
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: integration-business-pubsub
namespace: inma
spec:
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.0
EOF
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: integration-production-valmet-pubsub
namespace: inma
spec:
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.0
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: integration-production-abb-pubsub
namespace: inma
spec:
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.0
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: customer-portal-pubsub
namespace: inma
spec:
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