Open jdfrozen opened 2 years ago
1、部署 ./demo/metaprotocol-dubbo/uninstall.sh kubectl create ns meta-dubbo kubectl label namespace meta-dubbo istio-injection=enabled --overwrite kubectl apply -f demo/k8s/aeraki-bootstrap-config.yaml -n meta-dubbo kubectl apply -f demo/k8s/nacos -n meta-dubbo kubectl apply -f demo/traffic-rules/destinationrule.yaml -n meta-dubbo 2、查看pod 和log [root@master dubbo2istio]# kubectl get pod -n meta-dubbo NAME READY STATUS RESTARTS AGE dubbo-sample-consumer-5cf9f6f878-xxp8j 2/2 Running 0 22m dubbo-sample-provider-v1-566fbbb9fb-zd5hj 2/2 Running 0 22m dubbo-sample-provider-v2-68468d8bc9-2lnv4 2/2 Running 0 22m dubbo2istio-686d5554cc-5mnsg 1/1 Running 0 22m nacos-5cfbc49d9d-6kmd6 1/1 Running 0 22m [root@master dubbo2istio]# kubectl logs dubbo-sample-consumer-5cf9f6f878-xxp8j -n meta-dubbo|tail -n 10 Hello Aeraki, response from dubbo-sample-provider-v2-68468d8bc9-2lnv4/10.244.0.96 Hello Aeraki, response from dubbo-sample-provider-v1-566fbbb9fb-zd5hj/10.244.0.99 Hello Aeraki, response from dubbo-sample-provider-v2-68468d8bc9-2lnv4/10.244.0.96 Hello Aeraki, response from dubbo-sample-provider-v1-566fbbb9fb-zd5hj/10.244.0.99 Hello Aeraki, response from dubbo-sample-provider-v2-68468d8bc9-2lnv4/10.244.0.96 Hello Aeraki, response from dubbo-sample-provider-v1-566fbbb9fb-zd5hj/10.244.0.99 Hello Aeraki, response from dubbo-sample-provider-v2-68468d8bc9-2lnv4/10.244.0.96 Hello Aeraki, response from dubbo-sample-provider-v1-566fbbb9fb-zd5hj/10.244.0.99 Hello Aeraki, response from dubbo-sample-provider-v2-68468d8bc9-2lnv4/10.244.0.96 Hello Aeraki, response from dubbo-sample-provider-v1-566fbbb9fb-zd5hj/10.244.0.99 3、使用 MetaRouter 调整流量 kubectl apply -f- <<EOF apiVersion: metaprotocol.aeraki.io/v1alpha1 kind: MetaRouter metadata: name: test-metaprotocol-dubbo-route namespace: meta-dubbo spec: hosts:
5、使用VirtualService可以支持流量
dubbo2istio 不支持使用 MetaRouter 吗?
可以的,参考 https://www.aeraki.net/zh/docs/v1.x/tutorials/dubbo/#demo-%E5%BA%94%E7%94%A8
1、部署 ./demo/metaprotocol-dubbo/uninstall.sh kubectl create ns meta-dubbo kubectl label namespace meta-dubbo istio-injection=enabled --overwrite kubectl apply -f demo/k8s/aeraki-bootstrap-config.yaml -n meta-dubbo kubectl apply -f demo/k8s/nacos -n meta-dubbo kubectl apply -f demo/traffic-rules/destinationrule.yaml -n meta-dubbo 2、查看pod 和log [root@master dubbo2istio]# kubectl get pod -n meta-dubbo NAME READY STATUS RESTARTS AGE dubbo-sample-consumer-5cf9f6f878-xxp8j 2/2 Running 0 22m dubbo-sample-provider-v1-566fbbb9fb-zd5hj 2/2 Running 0 22m dubbo-sample-provider-v2-68468d8bc9-2lnv4 2/2 Running 0 22m dubbo2istio-686d5554cc-5mnsg 1/1 Running 0 22m nacos-5cfbc49d9d-6kmd6 1/1 Running 0 22m [root@master dubbo2istio]# kubectl logs dubbo-sample-consumer-5cf9f6f878-xxp8j -n meta-dubbo|tail -n 10 Hello Aeraki, response from dubbo-sample-provider-v2-68468d8bc9-2lnv4/10.244.0.96 Hello Aeraki, response from dubbo-sample-provider-v1-566fbbb9fb-zd5hj/10.244.0.99 Hello Aeraki, response from dubbo-sample-provider-v2-68468d8bc9-2lnv4/10.244.0.96 Hello Aeraki, response from dubbo-sample-provider-v1-566fbbb9fb-zd5hj/10.244.0.99 Hello Aeraki, response from dubbo-sample-provider-v2-68468d8bc9-2lnv4/10.244.0.96 Hello Aeraki, response from dubbo-sample-provider-v1-566fbbb9fb-zd5hj/10.244.0.99 Hello Aeraki, response from dubbo-sample-provider-v2-68468d8bc9-2lnv4/10.244.0.96 Hello Aeraki, response from dubbo-sample-provider-v1-566fbbb9fb-zd5hj/10.244.0.99 Hello Aeraki, response from dubbo-sample-provider-v2-68468d8bc9-2lnv4/10.244.0.96 Hello Aeraki, response from dubbo-sample-provider-v1-566fbbb9fb-zd5hj/10.244.0.99 3、使用 MetaRouter 调整流量 kubectl apply -f- <<EOF apiVersion: metaprotocol.aeraki.io/v1alpha1 kind: MetaRouter metadata: name: test-metaprotocol-dubbo-route namespace: meta-dubbo spec: hosts:
5、使用VirtualService可以支持流量
dubbo2istio 不支持使用 MetaRouter 吗?