问题
For some test, I have created a ServiceEntry
in Anthos Service Mesh. It also works when accessing that service with a curl
pod, the headers are set correctly
curl -v postman-echo.com/get
However, that service entry does not appear neither in the dash board nor in access logs. It seems that dashboard is limited to kubernetes services. If this is the case, is this only a limitation of the ASM dashboard (and maybe available in other installations, for example open source Istio with Kiali) or a fundamental limitation? Or am I doing something wrong?
YAML files
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
name: echo-service
spec:
hosts:
- postman-echo.com
ports:
- number: 80
name: http
protocol: HTTP
targetPort: 443
resolution: DNS
location: MESH_EXTERNAL
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: echo-service
spec:
hosts:
- postman-echo.com
http:
- headers:
request:
add:
ISTIO-REQUEST: "11111111111111"
response:
add:
ISTIO-RESPONSE: "22222222222222"
route:
- destination:
host: postman-echo.com
port:
number: 80
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: echo-service
spec:
host: postman-echo.com
subsets:
- name: tls-origination
trafficPolicy:
loadBalancer:
simple: ROUND_ROBIN
portLevelSettings:
- port:
number: 80
tls:
mode: SIMPLE
来源:https://stackoverflow.com/questions/65043896/service-entries-in-anthos-service-mesh