From 62bfaf3cbdb1a630d5f29fc307b848a68fa42eab Mon Sep 17 00:00:00 2001 From: salaboy Date: Fri, 21 Jun 2024 08:29:04 +0100 Subject: [PATCH] moving tutorial to Kubernetes section Signed-off-by: salaboy --- .../en/operations/dapr-shared/_index.md | 7 ------ .../kubernetes/kubernetes-dapr-shared.md} | 22 ++++++++++++++++--- .../kubernetes/kubernetes-volume-mounts.md | 2 +- 3 files changed, 20 insertions(+), 11 deletions(-) delete mode 100644 daprdocs/content/en/operations/dapr-shared/_index.md rename daprdocs/content/en/operations/{dapr-shared/dapr-shared.md => hosting/kubernetes/kubernetes-dapr-shared.md} (80%) diff --git a/daprdocs/content/en/operations/dapr-shared/_index.md b/daprdocs/content/en/operations/dapr-shared/_index.md deleted file mode 100644 index 537a72a1f..000000000 --- a/daprdocs/content/en/operations/dapr-shared/_index.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -type: docs -title: "Deploy Dapr on a per-machine or per-node with Dapr Shared" -linkTitle: "Dapr Shared" -weight: 100 -description: "Learn the different deployment strategies with Dapr Shared" ---- \ No newline at end of file diff --git a/daprdocs/content/en/operations/dapr-shared/dapr-shared.md b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-dapr-shared.md similarity index 80% rename from daprdocs/content/en/operations/dapr-shared/dapr-shared.md rename to daprdocs/content/en/operations/hosting/kubernetes/kubernetes-dapr-shared.md index 154bce4dc..16a10ea37 100644 --- a/daprdocs/content/en/operations/dapr-shared/dapr-shared.md +++ b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-dapr-shared.md @@ -2,7 +2,7 @@ type: docs title: "Deploy Dapr per-node or per-cluster with Dapr Shared" linkTitle: "Dapr Shared" -weight: 20000 +weight: 50000 description: "Learn more about using Dapr Shared as an alternative deployment to sidecars" --- @@ -20,7 +20,6 @@ For each Dapr application, you need to deploy the Dapr Shared chart using differ - ## Why Dapr Shared? By default, when Dapr is installed into a Kubernetes cluster, the Dapr control plane injects a Dapr as sidecar to applications annotated with Dapr annotations ( `dapr.io/enabled: "true"`). Sidecars have 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. @@ -63,6 +62,23 @@ Before installing Dapr Shared, make ensure you have [Dapr installed in your clus If you want to get started with Dapr Shared, you can create a new Dapr Shared instance by installing the official Helm Chart: ``` -helm install my-shared-instance oci://registry-1.docker.io/daprio/dapr-shared-chart --set shared.appId= --set shared.remoteURL= --set shared.remotePort= +helm install my-shared-instance oci://registry-1.docker.io/daprio/dapr-shared-chart --set shared.appId= --set shared.remoteURL= --set shared.remotePort= --set shared.strategy=deployment ``` + +Your Dapr-enabled applications can now make use of the Dapr Shared instance by pointing the Dapr SDKs or sending request to `my-shared-instance-dapr` Kubernetes service exposed by the Dapr Shared instance. Notice that `my-shared-instance` is the Helm Chart release name. + +If you are using the Dapr SDKs you can set the following environment variables for your application to connect to the Dapr Shared instance (in this case running on the `default` namespace): + +``` + env: + - name: DAPR_HTTP_ENDPOINT + value: http://my-shared-instance-dapr.default.svc.cluster.local:3500 + - name: DAPR_GRPC_ENDPOINT + value: http://my-shared-instance-dapr.default.svc.cluster.local:50001 +``` + +If you are not using the SDKs you can still send HTTP or gRCP requests to those endpoints. + ## Next steps + +Check the [`Hello Kubernetes with Dapr Shared`]() tutorial. diff --git a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-volume-mounts.md b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-volume-mounts.md index 00ee915dd..aa93ca17f 100644 --- a/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-volume-mounts.md +++ b/daprdocs/content/en/operations/hosting/kubernetes/kubernetes-volume-mounts.md @@ -2,7 +2,7 @@ type: docs title: "How-to: Mount Pod volumes to the Dapr sidecar" linkTitle: "How-to: Mount Pod volumes" -weight: 80000 +weight: 90000 description: "Configure the Dapr sidecar to mount Pod Volumes" ---