This repository contains libraries and tools for creating and deploying Dubbo applications in any Kubernetes environment, i.e. on Kubernetes, Aliyun ACK, etc.
- Ensure you have Go installed, version 1.20 or higher.
- Make sure you install kubectl.
- Ensure you have Dubboctl installed.
Use dubboctl create
to create a project template.
dubboctl create -l java
This should generate a simple project with a demo service properly configured and is ready to run.
For java developers, it's recommended to use start.dubbo.apache.org or IntelliJ IDEA plugin to generate more complicated templates.
Before deploying the application, let's install Nacos, Zookeeper, Prometheus and other components necessary for running a Dubbo application or microservice cluster.
dubboctl install --profile=demo # This will install Nacos, Prometheus, Grafana, Admin, etc.
Next, build your application as docker image and deploy it into kubernetes cluster with dubboctl deploy
, it will do the following two steps:
- Build your application from source code into docker image and push the image to remote repository.
- Generate all the kubernetes configurations (e.g., deployments, services, load balancers) needed to run your application on vanilla Kubernetes.
dubboctl deploy --out=deployment.yml
Finally, apply manifests into kubernetes cluster.
kubectl apply -f deployment.yml
We already have the application up and running, now it's time to continuously monitor the status or manage the traffics of our applications.
Run the following command and open http://localhost:38080/admin/
with your favourite browser.
dubboctl dashboard admin
dubboctl dashboard zipkin
Please refer to our official website to learn the traffic policies in Dubbo with some well-designed tasks.
- Timeout
- Accesslog
- Region-aware traffic split
- Weight-based traffic split
- Circuit breaking
- Canary release