Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Multi cluster case's sample load balanced not work with greeting sample apps #167

Closed
manmaujin2 opened this issue Feb 1, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@manmaujin2
Copy link

When I try to test the multiple cluster sample as below document and found that the remote cluster greeting app application does not have "admiral.io/env: stage" annotation so the service entry stage.greeting.global-se doesn't have Cluster 2's istio-ingressgateway address. After I added back the annotation in remote cluster greeting app then the service entry i.e. stage.greeting.global-se success to added cluster 2 istio-ingressgateway address.

apiVersion: networking.istio.io/v1beta1
kind: ServiceEntry
metadata:
  creationTimestamp: "2021-01-29T06:44:06Z"
  generation: 970
  labels:
    identity: greeting
  name: stage.greeting.global-se
  namespace: admiral-sync
spec:
  addresses:
  - 240.0.10.2
  endpoints:
  - address: 10.224.241.137
    locality: eastasia
    ports:
      http: 15443
  - address: greeting.sample.svc.cluster.local
    locality: eastasia
    ports:
      http: 80
  hosts:
  - stage.greeting.global
  location: MESH_INTERNAL
  ports:
  - name: http
    number: 80
    protocol: http
  resolution: DNS

(Ref: https://github.com/istio-ecosystem/admiral/blob/master/docs/Examples.md#verify)

However, when I trigger below command in cluster 1 to test the apps for load balancing. It always return cluster 1 greeting app payload i.e. "Hello World! - Admiral!!" and never return remote cluster (cluster 2) payload i.e. "Remote cluster says: Hello World! - Admiral!!".

kubectl exec --namespace=sample -it $(kubectl get pod -l "app=webapp" --namespace=sample -o jsonpath='{.items[0].metadata.name}') -c webapp -- curl -v http://stage.greeting.global

Anyone has idea ?

@manmaujin2 manmaujin2 added the bug Something isn't working label Feb 1, 2021
@manmaujin2
Copy link
Author

Found the issue. Check admiral-install-v1.1 version's sample yaml doesn't have the annotations. After append the annotations the load balancing problem is fixed

apiVersion: admiral.io/v1alpha1
kind: GlobalTrafficPolicy
metadata:
name: gtp-service1
namespace: sample
annotations:
admiral.io/env: stage

labels:
identity: greeting
spec:
policy:
- dns: stage.greeting.global
lbType: 1 #0 represents TOPOLOGY, 1 represents FAILOVER
target:
- region: us-west-2
weight: 80
- region: us-east-2
weight: 20

@josephpeacock
Copy link
Collaborator

@manmaujin2 Sorry for the delayed response, and glad you figured it out on your own! The sample was fixed in #162 and release 1.2 will be packaged with remote yaml files that include the required annotations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants