<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Deploy and run Dapr in Kubernetes mode on Dapr Docs</title><link>https://v1-18.docs.dapr.io/operations/hosting/kubernetes/</link><description>Recent content in Deploy and run Dapr in Kubernetes mode on Dapr Docs</description><generator>Hugo</generator><language>en</language><atom:link href="https://v1-18.docs.dapr.io/operations/hosting/kubernetes/index.xml" rel="self" type="application/rss+xml"/><item><title>Overview of Dapr on Kubernetes</title><link>https://v1-18.docs.dapr.io/operations/hosting/kubernetes/kubernetes-overview/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/operations/hosting/kubernetes/kubernetes-overview/</guid><description>&lt;p>Dapr can be configured to run on any supported versions of Kubernetes. To achieve this, Dapr begins by deploying the following Kubernetes services, which provide first-class integration to make running applications with Dapr easy.&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Kubernetes services&lt;/th>
 &lt;th>Description&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;code>dapr-operator&lt;/code>&lt;/td>
 &lt;td>Manages &lt;a href="https://v1-18.docs.dapr.io/operations/components/">component&lt;/a> updates and Kubernetes services endpoints for Dapr (state stores, pub/subs, etc.)&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>dapr-sidecar-injector&lt;/code>&lt;/td>
 &lt;td>Injects Dapr into &lt;a href="https://v1-18.docs.dapr.io/operations/hosting/kubernetes/kubernetes-overview/#adding-dapr-to-a-kubernetes-deployment">annotated&lt;/a> deployment pods and adds the environment variables &lt;code>DAPR_HTTP_PORT&lt;/code> and &lt;code>DAPR_GRPC_PORT&lt;/code> to enable user-defined applications to easily communicate with Dapr without hard-coding Dapr port values.&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>dapr-placement&lt;/code>&lt;/td>
 &lt;td>Used for &lt;a href="https://v1-18.docs.dapr.io/developing-applications/building-blocks/actors/">actors&lt;/a> only. Creates mapping tables that map actor instances to pods&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>dapr-sentry&lt;/code>&lt;/td>
 &lt;td>Manages mTLS between services and acts as a certificate authority. For more information read the &lt;a href="https://v1-18.docs.dapr.io/concepts/security-concept/">security overview&lt;/a>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;code>dapr-scheduler&lt;/code>&lt;/td>
 &lt;td>Provides distributed job scheduling capabilities used by the Jobs API, Workflow API, and Actor Reminders&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;img src="https://v1-18.docs.dapr.io/images/overview-kubernetes.png" width=1000>
&lt;h2 id="supported-versions">Supported versions&lt;/h2>
&lt;p>Dapr support for Kubernetes is aligned with &lt;a href="https://kubernetes.io/releases/version-skew-policy">Kubernetes Version Skew Policy&lt;/a>.&lt;/p></description></item><item><title>Deploy Dapr on a Kubernetes cluster</title><link>https://v1-18.docs.dapr.io/operations/hosting/kubernetes/kubernetes-deploy/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/operations/hosting/kubernetes/kubernetes-deploy/</guid><description>&lt;p>When &lt;a href="https://v1-18.docs.dapr.io/operations/hosting/kubernetes/kubernetes-overview/">setting up Dapr on Kubernetes&lt;/a>, you can use either the Dapr CLI or Helm.&lt;/p>


&lt;div class="alert alert-primary" role="alert">
&lt;h4 class="alert-heading">Hybrid clusters&lt;/h4>

 Both the Dapr CLI and the Dapr Helm chart automatically deploy with affinity for nodes with the label &lt;code>kubernetes.io/os=linux&lt;/code>. You can deploy Dapr to Windows nodes if your application requires it. For more information, see &lt;a href="https://v1-18.docs.dapr.io/operations/hosting/kubernetes/kubernetes-hybrid-clusters/">Deploying to a hybrid Linux/Windows Kubernetes cluster&lt;/a>.

&lt;/div>


 &lt;!-- Dapr CLI -->


 &lt;!-- Helm -->


&lt;ul class="nav nav-tabs" id="tabs-2" role="tablist">
 &lt;li class="nav-item">
 &lt;button class="nav-link active"
 id="tabs-02-00-tab" data-bs-toggle="tab" data-bs-target="#tabs-02-00" role="tab"
 data-td-tp-persist="dapr cli" aria-controls="tabs-02-00" aria-selected="true">
 Dapr CLI
 &lt;/button>
 &lt;/li>&lt;li class="nav-item">
 &lt;button class="nav-link"
 id="tabs-02-01-tab" data-bs-toggle="tab" data-bs-target="#tabs-02-01" role="tab"
 data-td-tp-persist="helm" aria-controls="tabs-02-01" aria-selected="false">
 Helm
 &lt;/button>
 &lt;/li>
&lt;/ul>

&lt;div class="tab-content" id="tabs-2-content">
 &lt;div class="tab-body tab-pane fade show active"
 id="tabs-02-00" role="tabpanel" aria-labelled-by="tabs-02-00-tab" tabindex="2">
 &lt;h2 id="install-with-dapr-cli">Install with Dapr CLI&lt;/h2>
&lt;p>You can install Dapr on a Kubernetes cluster using the &lt;a href="https://v1-18.docs.dapr.io/getting-started/install-dapr-cli/">Dapr CLI&lt;/a>.&lt;/p></description></item><item><title>Upgrade Dapr on a Kubernetes cluster</title><link>https://v1-18.docs.dapr.io/operations/hosting/kubernetes/kubernetes-upgrade/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/operations/hosting/kubernetes/kubernetes-upgrade/</guid><description>&lt;p>You can upgrade the Dapr control plane on a Kubernetes cluster using either the Dapr CLI or Helm.&lt;/p>


&lt;div class="alert alert-primary" role="alert">
&lt;h4 class="alert-heading">Note&lt;/h4>

 Refer to the &lt;a href="https://v1-18.docs.dapr.io/operations/support/support-release-policy/#upgrade-paths">Dapr version policy&lt;/a> for guidance on Dapr&amp;rsquo;s upgrade path.

&lt;/div>


 &lt;!-- Dapr CLI -->


 &lt;!-- Helm -->


&lt;ul class="nav nav-tabs" id="tabs-1" role="tablist">
 &lt;li class="nav-item">
 &lt;button class="nav-link active"
 id="tabs-01-00-tab" data-bs-toggle="tab" data-bs-target="#tabs-01-00" role="tab"
 data-td-tp-persist="dapr cli" aria-controls="tabs-01-00" aria-selected="true">
 Dapr CLI
 &lt;/button>
 &lt;/li>&lt;li class="nav-item">
 &lt;button class="nav-link"
 id="tabs-01-01-tab" data-bs-toggle="tab" data-bs-target="#tabs-01-01" role="tab"
 data-td-tp-persist="helm" aria-controls="tabs-01-01" aria-selected="false">
 Helm
 &lt;/button>
 &lt;/li>
&lt;/ul>

&lt;div class="tab-content" id="tabs-1-content">
 &lt;div class="tab-body tab-pane fade show active"
 id="tabs-01-00" role="tabpanel" aria-labelled-by="tabs-01-00-tab" tabindex="1">
 &lt;h2 id="upgrade-using-the-dapr-cli">Upgrade using the Dapr CLI&lt;/h2>
&lt;p>You can upgrade Dapr using the &lt;a href="https://v1-18.docs.dapr.io/getting-started/install-dapr-cli/">Dapr CLI&lt;/a>.&lt;/p></description></item><item><title>Production guidelines on Kubernetes</title><link>https://v1-18.docs.dapr.io/operations/hosting/kubernetes/kubernetes-production/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/operations/hosting/kubernetes/kubernetes-production/</guid><description>&lt;h2 id="cluster-and-capacity-requirements">Cluster and capacity requirements&lt;/h2>
&lt;p>Dapr support for Kubernetes is aligned with &lt;a href="https://kubernetes.io/releases/version-skew-policy/">Kubernetes Version Skew Policy&lt;/a>.&lt;/p>
&lt;p>Use the following resource settings as a starting point. Requirements vary depending on cluster size, number of pods, and other factors. Perform individual testing to find the right values for your environment. In production, it&amp;rsquo;s recommended to not add memory limits to the Dapr control plane components to avoid &lt;code>OOMKilled&lt;/code> pod statuses.&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>Deployment&lt;/th>
 &lt;th>CPU&lt;/th>
 &lt;th>Memory&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>&lt;strong>Operator&lt;/strong>&lt;/td>
 &lt;td>Limit: 1, Request: 100m&lt;/td>
 &lt;td>Request: 100Mi&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Sidecar Injector&lt;/strong>&lt;/td>
 &lt;td>Limit: 1, Request: 100m&lt;/td>
 &lt;td>Request: 30Mi&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Sentry&lt;/strong>&lt;/td>
 &lt;td>Limit: 1, Request: 100m&lt;/td>
 &lt;td>Request: 30Mi&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>&lt;strong>Placement&lt;/strong>&lt;/td>
 &lt;td>Limit: 1, Request: 250m&lt;/td>
 &lt;td>Request: 75Mi&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>


&lt;div class="alert alert-primary" role="alert">
&lt;h4 class="alert-heading">Note&lt;/h4>

 For more information, refer to the Kubernetes documentation on &lt;a href="https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#resource-units-in-kubernetes">CPU and Memory resource units and their meaning&lt;/a>.

&lt;/div>

&lt;h3 id="helm">Helm&lt;/h3>
&lt;p>When installing Dapr using Helm, no default limit/request values are set. Each component has a &lt;code>resources&lt;/code> option (for example, &lt;code>dapr_dashboard.resources&lt;/code>), which you can use to tune the Dapr control plane to fit your environment.&lt;/p></description></item><item><title>Deploy Dapr per-node or per-cluster with Dapr Shared</title><link>https://v1-18.docs.dapr.io/operations/hosting/kubernetes/kubernetes-dapr-shared/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/operations/hosting/kubernetes/kubernetes-dapr-shared/</guid><description>&lt;p>Dapr automatically injects a sidecar to enable the Dapr APIs for your applications for the best availability and reliability.&lt;/p>
&lt;p>Dapr Shared enables two alternative deployment strategies to create Dapr applications using a Kubernetes &lt;code>Daemonset&lt;/code> for a per-node deployment or a &lt;code>Deployment&lt;/code> for a per-cluster deployment.&lt;/p>
&lt;ul>
&lt;li>&lt;strong>&lt;code>DaemonSet&lt;/code>:&lt;/strong> When running Dapr Shared as a Kubernetes &lt;code>DaemonSet&lt;/code> resource, the daprd container runs on each Kubernetes node in the cluster. This can reduce network hops between the applications and Dapr.&lt;/li>
&lt;li>&lt;strong>&lt;code>Deployment&lt;/code>:&lt;/strong> When running Dapr Shared as a Kubernetes &lt;code>Deployment&lt;/code>, the Kubernetes scheduler decides on which single node in the cluster the daprd container instance runs.&lt;/li>
&lt;/ul>


&lt;div class="alert alert-primary" role="alert">
&lt;h4 class="alert-heading">Dapr Shared deployments&lt;/h4>

 For each Dapr application you deploy, you need to deploy the Dapr Shared Helm chart using different &lt;code>shared.appId&lt;/code>s.

&lt;/div>

&lt;h2 id="why-dapr-shared">Why Dapr Shared?&lt;/h2>
&lt;p>By default, when Dapr is installed into a Kubernetes cluster, the Dapr control plane injects Dapr as a sidecar to applications annotated with Dapr annotations ( &lt;code>dapr.io/enabled: &amp;quot;true&amp;quot;&lt;/code>). Sidecars offer many advantages, including improved resiliency, since there is an instance per application and all communication between the application and the sidecar happens without involving the network.&lt;/p></description></item><item><title>How-to: Persist Scheduler Jobs</title><link>https://v1-18.docs.dapr.io/operations/hosting/kubernetes/kubernetes-persisting-scheduler/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/operations/hosting/kubernetes/kubernetes-persisting-scheduler/</guid><description>&lt;p>The &lt;a href="https://v1-18.docs.dapr.io/concepts/dapr-services/scheduler/">Scheduler&lt;/a> service is responsible for writing jobs to its Etcd database and scheduling them for execution.
By default, the Scheduler service database embeds Etcd and writes data to a Persistent Volume Claim volume of size &lt;code>1Gb&lt;/code>, using the cluster&amp;rsquo;s default &lt;a href="https://kubernetes.io/docs/concepts/storage/storage-classes/">storage class&lt;/a>.
This means that there is no additional parameter required to run the scheduler service reliably on most Kubernetes deployments, although you will need &lt;a href="https://v1-18.docs.dapr.io/operations/hosting/kubernetes/kubernetes-persisting-scheduler/#storage-class">additional configuration&lt;/a> if a default StorageClass is not available or when running a production environment.&lt;/p></description></item><item><title>Deploy to hybrid Linux/Windows Kubernetes clusters</title><link>https://v1-18.docs.dapr.io/operations/hosting/kubernetes/kubernetes-hybrid-clusters/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/operations/hosting/kubernetes/kubernetes-hybrid-clusters/</guid><description>&lt;p>Dapr supports running your microservices on Kubernetes clusters on:&lt;/p>
&lt;ul>
&lt;li>Windows&lt;/li>
&lt;li>Linux&lt;/li>
&lt;li>A combination of both&lt;/li>
&lt;/ul>
&lt;p>This is especially helpful during a piecemeal migration of a legacy application into a Dapr Kubernetes cluster.&lt;/p>
&lt;p>Kubernetes uses a concept called &lt;strong>node affinity&lt;/strong> to denote whether you want your application to be launched on a Linux node or a Windows node. When deploying to a cluster which has both Windows and Linux nodes, you must provide affinity rules for your applications, otherwise the Kubernetes scheduler might launch your application on the wrong type of node.&lt;/p></description></item><item><title>Running Dapr with a Kubernetes Job</title><link>https://v1-18.docs.dapr.io/operations/hosting/kubernetes/kubernetes-job/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/operations/hosting/kubernetes/kubernetes-job/</guid><description>&lt;p>The Dapr sidecar is designed to be a long running process. In the context of a &lt;a href="https://kubernetes.io/docs/concepts/workloads/controllers/job/">Kubernetes Job&lt;/a> this behavior can block your job completion.&lt;/p>


&lt;div class="alert alert-primary" role="alert">
&lt;h4 class="alert-heading">Native sidecars&lt;/h4>

 On Kubernetes 1.28+, you can enable &lt;a href="https://v1-18.docs.dapr.io/concepts/dapr-services/sidecar/#native-sidecars-kubernetes-128">native sidecars&lt;/a> to ensure &lt;code>daprd&lt;/code> operates as a &lt;a href="https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/">Kubernetes native sidecar&lt;/a> and follows its shutdown semantics.

&lt;/div>

&lt;p>When running a basic &lt;a href="https://kubernetes.io/docs/concepts/workloads/controllers/job/">Kubernetes Job&lt;/a>, you need to call the &lt;code>/shutdown&lt;/code> endpoint for the sidecar to gracefully stop and the job to be considered &lt;code>Completed&lt;/code>.&lt;/p></description></item><item><title>How-to: Mount Pod volumes to the Dapr sidecar</title><link>https://v1-18.docs.dapr.io/operations/hosting/kubernetes/kubernetes-volume-mounts/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v1-18.docs.dapr.io/operations/hosting/kubernetes/kubernetes-volume-mounts/</guid><description>&lt;p>The Dapr sidecar can be configured to mount any Kubernetes Volume attached to the application Pod. These Volumes can be accessed by the &lt;code>daprd&lt;/code> (sidecar) container in &lt;em>read-only&lt;/em> or &lt;em>read-write&lt;/em> modes. If a Volume is configured to be mounted but it does not exist in the Pod, Dapr logs a warning and ignores it.&lt;/p>
&lt;p>For more information on different types of Volumes, check the &lt;a href="https://kubernetes.io/docs/concepts/storage/volumes/">Kubernetes documentation&lt;/a>.&lt;/p>
&lt;h2 id="configuration">Configuration&lt;/h2>
&lt;p>You can set the following annotations in your deployment YAML:&lt;/p></description></item></channel></rss>