https://istio.io/latest/docs/setup/getting-started/
curl -L https://istio.io/downloadIstio | sh -# 此处选用 demo , 要用其他模式参考链接
# https://istio.io/latest/docs/setup/additional-setup/config-profiles/
istioctl install --set profile=demo -ykubectl label ns default istio-injection=enabled- 创建 gateway
- 创建 virtualservice
- 创建证书并导入到 secret
- gateway 使用 tls 并指定证书
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: httpserver-gateway
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 443
name: https-port
protocol: HTTPS
hosts:
- "httpsserver.cncamp.io"
tls:
mode: SIMPLE
credentialName: cncamp-io-tlsapiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: http-server
spec:
gateways:
- httpserver-gateway
hosts:
- httpsserver.cncamp.io
http:
- match:
- uri:
exact: "/service0/hello"
rewrite:
uri: "/hello"
route:
- destination:
host: http-server-service0.default.svc.cluster.local
port:
number: 80- 安装 Jaeger
- 应用增加 header 转发和数据采集
istioctl upgrade --set meshConfig.defaultConfig.tracing.zipkin.address=jaeger-collector:9411