Dapr vs Kubernetes

Need advice about which tool to choose?Ask the StackShare community!

Dapr

95
335
+ 1
9
Kubernetes

59.5K
51.4K
+ 1
681
Add tool

Dapr vs Kubernetes: What are the differences?

Introduction

Dapr and Kubernetes are both open-source technologies that are widely used in modern cloud-native application development. While they share some similarities, there are several key differences between these two platforms. In this article, we will explore the key differences between Dapr and Kubernetes and highlight the advantages and use cases of each technology.

  1. Orchestration vs. Runtime: One of the key differences between Dapr and Kubernetes is their primary focus. Kubernetes is primarily an orchestration platform that manages the deployment and scaling of containerized applications. It provides features like service discovery, load balancing, and automatic scaling. On the other hand, Dapr is a runtime framework that provides a set of building blocks and services for developing and running distributed applications. Dapr can be used alongside Kubernetes or any other orchestrator to add functionality such as state management, pub/sub messaging, and event-driven programming.

  2. Granularity of Abstraction: Another important difference between Dapr and Kubernetes is the granularity of abstraction they provide. Kubernetes operates at the infrastructure level, managing containers and pods, while Dapr operates at the application level, providing a higher-level abstraction for developers. Dapr abstracts away the complexities of distributed systems, allowing developers to focus on writing business logic and microservices without having to deal with infrastructure concerns.

  3. Polyglot Support: Dapr supports multiple programming languages and frameworks, whereas Kubernetes is primarily focused on orchestrating containerized applications. Dapr provides SDKs and language-specific frameworks for popular languages like .NET, Java, Python, and Go, allowing developers to write microservices in their preferred language. Kubernetes, on the other hand, supports any containerized application, regardless of the programming language used.

  4. State Management: Dapr provides a built-in state management feature that allows applications to store and retrieve state in a distributed and scalable manner. It supports various state stores such as Redis, Azure Cosmos DB, and Apache Cassandra. Kubernetes, on the other hand, does not provide built-in state management capabilities, and applications typically have to rely on external databases or storage systems to manage state.

  5. Event-driven Programming: Dapr provides a robust event-driven programming model, enabling applications to react to events and messages asynchronously. It supports popular messaging systems like RabbitMQ, Kafka, and Azure Service Bus, and allows developers to easily build event-driven architectures. Kubernetes does not provide native support for event-driven programming, although it can integrate with messaging systems through custom configurations.

  6. Service Mesh Integration: Dapr can be seamlessly integrated with popular service mesh frameworks like Istio and Linkerd. Service meshes provide advanced networking features like traffic management, observability, and security for microservices architectures. Kubernetes itself does not include a service mesh, but it can be used as an orchestrator for deploying and managing service mesh frameworks alongside Dapr.

In summary, Dapr and Kubernetes have different focuses and provide complementary capabilities for building modern distributed applications. Kubernetes excels at container orchestration and infrastructure management, while Dapr provides a developer-friendly runtime for building microservices and adds functionality like state management and event-driven programming. Both technologies can be used together to create scalable and resilient cloud-native applications.

Decisions about Dapr and Kubernetes
Simon Reymann
Senior Fullstack Developer at QUANTUSflow Software GmbH · | 30 upvotes · 10.3M views

Our whole DevOps stack consists of the following tools:

  • GitHub (incl. GitHub Pages/Markdown for Documentation, GettingStarted and HowTo's) for collaborative review and code management tool
  • Respectively Git as revision control system
  • SourceTree as Git GUI
  • Visual Studio Code as IDE
  • CircleCI for continuous integration (automatize development process)
  • Prettier / TSLint / ESLint as code linter
  • SonarQube as quality gate
  • Docker as container management (incl. Docker Compose for multi-container application management)
  • VirtualBox for operating system simulation tests
  • Kubernetes as cluster management for docker containers
  • Heroku for deploying in test environments
  • nginx as web server (preferably used as facade server in production environment)
  • SSLMate (using OpenSSL) for certificate management
  • Amazon EC2 (incl. Amazon S3) for deploying in stage (production-like) and production environments
  • PostgreSQL as preferred database system
  • Redis as preferred in-memory database/store (great for caching)

The main reason we have chosen Kubernetes over Docker Swarm is related to the following artifacts:

  • Key features: Easy and flexible installation, Clear dashboard, Great scaling operations, Monitoring is an integral part, Great load balancing concepts, Monitors the condition and ensures compensation in the event of failure.
  • Applications: An application can be deployed using a combination of pods, deployments, and services (or micro-services).
  • Functionality: Kubernetes as a complex installation and setup process, but it not as limited as Docker Swarm.
  • Monitoring: It supports multiple versions of logging and monitoring when the services are deployed within the cluster (Elasticsearch/Kibana (ELK), Heapster/Grafana, Sysdig cloud integration).
  • Scalability: All-in-one framework for distributed systems.
  • Other Benefits: Kubernetes is backed by the Cloud Native Computing Foundation (CNCF), huge community among container orchestration tools, it is an open source and modular tool that works with any OS.
See more
Manage your open source components, licenses, and vulnerabilities
Learn More
Pros of Dapr
Pros of Kubernetes
  • 3
    Manage inter-service state
  • 2
    MTLS "for free"
  • 2
    App dashboard for rapid log overview
  • 2
    Zipkin app tracing "for free"
  • 166
    Leading docker container management solution
  • 129
    Simple and powerful
  • 107
    Open source
  • 76
    Backed by google
  • 58
    The right abstractions
  • 25
    Scale services
  • 20
    Replication controller
  • 11
    Permission managment
  • 9
    Supports autoscaling
  • 8
    Simple
  • 8
    Cheap
  • 6
    Self-healing
  • 5
    Open, powerful, stable
  • 5
    Reliable
  • 5
    No cloud platform lock-in
  • 5
    Promotes modern/good infrascture practice
  • 4
    Scalable
  • 4
    Quick cloud setup
  • 3
    Custom and extensibility
  • 3
    Captain of Container Ship
  • 3
    Cloud Agnostic
  • 3
    Backed by Red Hat
  • 3
    Runs on azure
  • 3
    A self healing environment with rich metadata
  • 2
    Everything of CaaS
  • 2
    Gke
  • 2
    Golang
  • 2
    Easy setup
  • 2
    Expandable
  • 2
    Sfg

Sign up to add or upvote prosMake informed product decisions

Cons of Dapr
Cons of Kubernetes
  • 1
    Additional overhead
  • 16
    Steep learning curve
  • 15
    Poor workflow for development
  • 8
    Orchestrates only infrastructure
  • 4
    High resource requirements for on-prem clusters
  • 2
    Too heavy for simple systems
  • 1
    Additional vendor lock-in (Docker)
  • 1
    More moving parts to secure
  • 1
    Additional Technology Overhead

Sign up to add or upvote consMake informed product decisions

- No public GitHub repository available -

What is Dapr?

It is a portable, event-driven runtime that makes it easy for developers to build resilient, stateless and stateful microservices that run on the cloud and edge and embraces the diversity of languages and developer frameworks.

What is Kubernetes?

Kubernetes is an open source orchestration system for Docker containers. It handles scheduling onto nodes in a compute cluster and actively manages workloads to ensure that their state matches the users declared intentions.

Need advice about which tool to choose?Ask the StackShare community!

What companies use Dapr?
What companies use Kubernetes?
Manage your open source components, licenses, and vulnerabilities
Learn More

Sign up to get full access to all the companiesMake informed product decisions

What tools integrate with Dapr?
What tools integrate with Kubernetes?

Sign up to get full access to all the tool integrationsMake informed product decisions

Blog Posts

Kubernetesetcd+2
2
1176
Dec 8 2020 at 5:50PM

DigitalOcean

GitHubMySQLPostgreSQL+11
2
2416
PythonDockerKubernetes+7
3
1131
May 21 2020 at 12:02AM

Rancher Labs

KubernetesAmazon EC2Grafana+12
5
1517
Apr 16 2020 at 5:34AM

Rancher Labs

KubernetesRancher+2
2
955
What are some alternatives to Dapr and Kubernetes?
Istio
Istio is an open platform for providing a uniform way to integrate microservices, manage traffic flow across microservices, enforce policies and aggregate telemetry data. Istio's control plane provides an abstraction layer over the underlying cluster management platform, such as Kubernetes, Mesos, etc.
Akka
Akka is a toolkit and runtime for building highly concurrent, distributed, and resilient message-driven applications on the JVM.
Orleans
Orleans is a framework that provides a straightforward approach to building distributed high-scale computing applications, without the need to learn and apply complex concurrency or other scaling patterns. It was created by Microsoft Research and designed for use in the cloud.
Knative
Knative provides a set of middleware components that are essential to build modern, source-centric, and container-based applications that can run anywhere: on premises, in the cloud, or even in a third-party data center
Envoy
Originally built at Lyft, Envoy is a high performance C++ distributed proxy designed for single services and applications, as well as a communication bus and “universal data plane” designed for large microservice “service mesh” architectures.
See all alternatives