An opinionated deployment of Dapr on Kubernetes, configured with:
- Ingress with custom domain and TLS termination
- NGINX for ingress controller and TLS to service mapping
- letsencrypt as certificate provider
- KEDA for autoscaling
- Metrics Monitoring
- Prometheus for metrics aggregation
- Grafana for metrics visualization with Dapr monitoring dashboards
- Log Management
- Fluentd for log collection and forwarding
- Elasticsearch for log aggregation and query execution
- Kibana for full-text log query and visualization
- Distributed Tracing
- Jaeger for capturing traces, latency and dependency viewing
All demos in the dapr-demo repository are validated on this deployment
- 1.15+ Kubernates cluster. If needed, you can setup cluster on:
- Tooling on the machine where you will be running this setup:
- Domain name and access to the DNS service where you can manage that domain (required for letsencrypt challenge during cert generation and the
Arecord creation to pont to the ingress gateway IP for custom domain support)
The following parameters can be used to configure your deployment. Define these as environment variables to set or override the default value:
DOMAIN # default: example.com
DAPR_HA # default: true
DAPR_LOG_AS_JSON # default: trueNote, make sure the correct "target" cluster is set kubectl context (
kubectl config current-context). You can lists all registered contexts using:kubectl config get-contexts, and if needed, set it usingkubectl config use-context demo.
Start by navigate to the setup directory
Run
makeby itself to see the active configuration
To deploy and configure Dapr
make daprto install Dapr, KEDA, and the entire observability stackmake configto perform post-install configurations
Optionally you can use
make upgradeto in place upgrade Dapr to specific version
To configure external access
make ip(optional) to create static IP in the cluster resource groupmake certsto create TLS certs using letsencryptmake ingressto configures NGINX ingress, SSL termination, Dapr API authmake dnsto configure your DNS service for custom domain supportmake testto test deployment
To deploy in-cluster data services
make redisto install Redis into the clustermake mongoto install Mongo into the clustermake kafkato install Kafka into the cluster
And few cluster operations helpers
node-listto print node resources and their usagemake portsto forward observability dashboards portsmake passto print the Grafana password (username: admin)
Then for each namespace you want to deploy Dapr apps to
make namespaceto create/configure namespace with service secrets
To get access to the Kibana, Grafana, Zipkin dashboards run:
make portsThis will forward the necessary ports so you can access the dashboards using:
- kibana - http://localhost:5601
- grafana - http://localhost:8888
- zipkin - http://localhost:9411
To stop port forwarding run
make portstopTo find the list of all the commands with their short descriptions run:
make helpThis is my personal project and it does not represent my employer. While I do my best to ensure that everything works, I take no responsibility for issues caused by this code.
This software is released under the MIT