dapr / quickstarts

Dapr quickstart code samples and tutorials showcasing core Dapr capabilities
Apache License 2.0
1.02k stars 516 forks source link

Hello Kubernetes tutorial should use the Helm installation instead of the dapr init -k approach #1028

Open salaboy opened 1 month ago

salaboy commented 1 month ago

Looking at this tutorial: https://github.com/dapr/quickstarts/tree/master/tutorials/hello-kubernetes , as a Kubernetes user I get scared of using a new CLI to install tools. I recommend switching to installing Dapr using Helm, a mechanism much more familiar to Kubernetes user.

This means changing dapr init -k --dev for the following commands:

Install Dapr

helm repo add dapr https://dapr.github.io/helm-charts/
helm repo update
helm upgrade --install dapr dapr/dapr \
--version=1.13.2 \
--namespace dapr-system \
--create-namespace \
--wait

To install Redis:

helm install redis oci://registry-1.docker.io/bitnamicharts/redis --version 17.11.3 --set "architecture=standalone" --set "master.persistence.size=1Gi"

If dapr init -k --dev is installing more things, for Kubernetes audience we need to make them explicit. Nobody likes installing things on a cluster without knowing exactly what is going on, it makes it more difficult to troubleshoot.

pdebruin commented 2 weeks ago

I agree that there should be a transparent description of how to deploy Dapr and friends to Kubernetes instead of --dev: Source: https://github.com/dapr/cli/blob/master/pkg/kubernetes/kubernetes.go#L99

salaboy commented 2 weeks ago

@pdebruin do you want to work with me on these changes ? I am happy to do a simple configuration first but I might need help for more advanced use cases

joebowbeer commented 2 weeks ago

Redis should be installed with a dedicated release name, which is currently dapr-dev-redis in default namespace. (Same applies to zipkin.)

helm install redis oci://registry-1.docker.io/bitnamicharts/redis --version 17.11.3 --set "architecture=standalone" --set "master.persistence.size=1Gi"

Consider using subcharts (umbrella) to make this even easier. Provide one dapr-dev umbrella chart, with redis and zipkin subcharts, and one dapr (non-dev) chart?