In this lab, we will install Dapr on a Kubernetes cluster. You will need access to a Kubernetes cluster to complete this lab. Minikube can be used to host a local Kubernetes cluster.
All applications that are used throughout the entire course are listed under Installs.
How complete the lab:
- Install Dapr in your Kubernetes cluster using Helm:
helm repo add dapr https://dapr.github.io/helm-charts/
helm repo update
helm install dapr dapr/dapr --namespace dapr-system --create-namespace
- Check the installation
kubectl get pods -n dapr-system
kubectl get pods
kubectl logs -l app=page-counter -c page-counter
- Port forward to your application and the sidecar:
kubectl -- port-forward $(kubectl get pods -l app=page-counter -o jsonpath="{.items[0].metadata.name}") 3500:3500
kubectl port-forward $(kubectl get pods -l app=page-counter -o jsonpath="{.items[0].metadata.name}") 3500:3500
- Test the application by incrementing the page counter:
curl http://localhost:8081
curl http://localhost:3500/v1.0/state/statestore/counter
Done!