January 2019
Intermediate to advanced
484 pages
11h 48m
English
The LoadBalancer needs to bind both my-http-backend-service and my-tomcat-backend-service. In this scenario, only /examples and /examples/* will be traffic forwarded to my-tomcat-backend-service. Other than that, every URI forwards traffic to my-http-backend-service:
//create load balancer(url-map) to associate my-http-backend-service as default$ gcloud compute url-maps create my-loadbalancer --default-service my-http-backend-service //add /examples and /examples/* mapping to my-tomcat-backend-service$ gcloud compute url-maps add-path-matcher my-loadbalancer --default-service my-http-backend-service --path-matcher-name tomcat-map --path-rules /examples=my-tomcat-backend-service,/examples/*=my-tomcat-backend-service ...
Read now
Unlock full access