kubectl exec -it -c sleep $(kubectl get pod -l app=sleep,version=v1 -o jsonpath={.items[0].metadata.name}) /bin/bash
bash-4.4# for i in `seq 100` ; do http http://flaskapp/fetch_with_trace?url=http://httpbin:8000/ip ; done
1.2.2.1 fetch_with_header
通过 /fetch_with_header 方法,可以观察 header 传递过程中的变化:
bash-4.4# do http http://flaskapp/fetch_with_header?url=http://httpbin:8000/get
# 同时启用 "ingress" ,开放服务
vim install/kubernetes/helm/istio/charts/kiali/values.yaml
# 使用当前最新(2019年6月前后)稳定镜像
tag: v0.20
# "ingress" 资源的 "spec.rules.host.http.paths.path" 字段,即 "subpath"
contextPath: /kiali
ingress:
# 启用 "ingress",默认值 "false"
enabled: true
# Used to create an Ingress record.
hosts:
# 修改 "domain"
- kiali.istio
annotations:
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
tls:
# Secrets must be manually created in the namespace.
# - secretName: kiali-tls
# hosts:
# - kiali.local
dashboard:
# 以名为 "kiali" 的 "Secret" 对象传递登陆账号与密码
secretName: kiali # You must create a secret with this name - one is not provided out-of-box.
# 重定向,以 "ConfigMap" 对象的形式挂载到工作负载
# 注意:可以被访问的外部地址
grafanaURL: http://grafana:3000 # If you have Grafana installed and it is accessible to client browsers, then set this to its external URL. Kiali will redirect users to this URL when Grafana metrics are to be shown.
jaegerURL: http://tracing:80 # If you have Jaeger installed and it is accessible to client browsers, then set this property to its external URL. Kiali will redirect users to this URL when Jaeger tracing is to be shown.