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
A
record 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: true
Note, 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
make
by itself to see the active configuration
To deploy and configure Dapr
make dapr
to install Dapr, KEDA, and the entire observability stackmake config
to perform post-install configurations
Optionally you can use
make upgrade
to in place upgrade Dapr to specific version
To configure external access
make ip
(optional) to create static IP in the cluster resource groupmake certs
to create TLS certs using letsencryptmake ingress
to configures NGINX ingress, SSL termination, Dapr API authmake dns
to configure your DNS service for custom domain supportmake test
to test deployment
To deploy in-cluster data services
make redis
to install Redis into the clustermake mongo
to install Mongo into the clustermake kafka
to install Kafka into the cluster
And few cluster operations helpers
node-list
to print node resources and their usagemake ports
to forward observability dashboards portsmake pass
to print the Grafana password (username: admin)
Then for each namespace you want to deploy Dapr apps to
make namespace
to create/configure namespace with service secrets
To get access to the Kibana, Grafana, Zipkin dashboards run:
make ports
This 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 portstop
To find the list of all the commands with their short descriptions run:
make help
This 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