From ba593eae906b29196e31c362736722a12399c74e Mon Sep 17 00:00:00 2001 From: Charlie Stanley Date: Fri, 10 Jul 2020 13:21:04 -0700 Subject: [PATCH] Added docs for installing dapr to hybrid windows/linux clusters (#679) --- getting-started/cluster/hybrid-clusters.md | 27 ++++++++++++++++++++++ getting-started/environment-setup.md | 5 ++++ 2 files changed, 32 insertions(+) create mode 100644 getting-started/cluster/hybrid-clusters.md diff --git a/getting-started/cluster/hybrid-clusters.md b/getting-started/cluster/hybrid-clusters.md new file mode 100644 index 000000000..dde40a35a --- /dev/null +++ b/getting-started/cluster/hybrid-clusters.md @@ -0,0 +1,27 @@ +# Deploying to Hybrid Linux/Winodws K8s Clusters + +## Installing the Dapr Control Plane + +If you are installing using the Dapr CLI or via helm chart, you can simply follow our normal deployment procedures: +[Installing Dapr on a Kubernetes cluster](../environment-setup.md#installing-Dapr-on-a-kubernetes-cluster) + +Affinity will be automatically set for kubernetes.io/os=linux. If you need to override linux to another value, you can do so by setting: +``` +helm install dapr dapr/dapr --set global.daprControlPlaneOs=YOUR_OS +``` +Dapr control plane container images are only provided for Linux, so you shouldn't need to do this unless you really know what you are doing. + +## Installing Dapr Apps +The Dapr sidecar container is currently linux only. For this reason, if you are writing a Dapr application, you must run it in a Linux container. You can track the progress of Dapr sidecar support for windows containers via [dapr/dapr#842](https://github.com/dapr/dapr/issues/842). + +When deploying to a hybrid cluster, you must configure your apps to be deployed to only Linux available nodes. One of the simplest ways to do this is to add kubernetes.io/os=linux to your app's nodeSelector. + +```yaml +spec: + nodeSelector: + kubernetes.io/os: linux +``` + +Kubernetes also supports much more advanced configuration via node affinity. +See https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/ for more examples. + diff --git a/getting-started/environment-setup.md b/getting-started/environment-setup.md index b0e3910ae..9a37b3690 100644 --- a/getting-started/environment-setup.md +++ b/getting-started/environment-setup.md @@ -135,6 +135,11 @@ You can install Dapr on any Kubernetes cluster. Here are some helpful links: - [Setup Google Cloud Kubernetes Engine](https://cloud.google.com/kubernetes-engine/docs/quickstart) - [Setup Amazon Elastic Kubernetes Service](https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html) +> **Note:** The dapr control plane containers are curently only distributed on linux containers. +> Your kubernetes cluser must contain available Linux capable nodes. +> Both the dapr cli, and the dapr helm chart will automatically deploy with affinity for nodes with the label kubernetes.io/os=linux. +> For more information see [Deploying to a Hybrid Linux/Windows K8s Cluster](./cluster/hybrid-clusters.md) + ### Using the Dapr CLI You can install Dapr to a Kubernetes cluster using CLI.