This is a brief guide to deploying Dapr Store to Kubernetes.
Assumptions:
- kubectl is installed, and configured to access your Kubernetes cluster
- Dapr CLI is installed - https://docs.dapr.io/getting-started/install-dapr-cli/
- helm is installed - https://helm.sh/docs/intro/install/
This guide does not cover more advanced deployment scenarios such as deploying behind a DNS name, or with HTTPS enabled or with used identity enabled.
For more details see the documentation for the Dapr Store Helm chart
Skip this if the Dapr control plane is already deployed
dapr init --kubernetes
kubectl get pod --namespace dapr-system
Full instructions here:
📃 https://docs.dapr.io/operations/hosting/kubernetes/kubernetes-overview/
Optional - If you wish to view or check the Dapr dashboard
kubectl port-forward deploy/dapr-dashboard --namespace dapr-system 8080:8080
Open the dashboard at http://localhost:8080/
namespace=dapr-store
kubectl create namespace $namespace
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm repo update
helm install dapr-redis bitnami/redis --values deploy/config/redis-values.yaml --namespace $namespace
Validate & check status
helm list --namespace $namespace
kubectl get pod daprstore-redis-master-0 --namespace $namespace
helm install api-gateway ingress-nginx/ingress-nginx --values deploy/config/ingress-values.yaml --namespace $namespace
Validate & check status
helm list --namespace $namespace
kubectl get pod -l app.kubernetes.io/instance=api-gateway --namespace $namespace
kubectl get svc --namespace $namespace
Now deploy the Dapr Store application and all services using Helm
helm install store ./deploy/helm/daprstore --namespace $namespace
Validate & check status
helm list --namespace $namespace
kubectl get pod -l app.kubernetes.io/instance=store --namespace $namespace
To get the URL of the deployed store run the following command:
echo -e "Access Dapr Store here: http://$(kubectl get svc -l "purpose=daprstore-api-gateway" -o jsonpath="{.items[0].status.loadBalancer.ingress[0].ip}")/"