在 Istio 中将跟踪后端配置为 Zipkin

Configure tracing backend to be Zipkin in Istio

我正在尝试配置 Istio 控制平面以使用 zipkin 作为跟踪后端,但我做不到。在他们的文档中,他们声明为了做到这一点,我只需要在安装 Istio 时传递以下参数:

--set values.tracing.enabled=true--set values.tracing.provider=zipkin。我的问题是我手动安装了 Istio。

我在 Configmap istio-sidecar-injector 中找到了参数 provider: jaeger 并进行了更改,然后终止了控制平面以便用 zipkin 重新部署它,但是没有'没用。

有谁知道object/s我应该如何操作才能获得 zipkin?

通过使用以下 commands I was able to generate the manifests using istioctl 和您提到的参数:

$ istioctl manifest generate --set profile=demo --set values.tracing.enabled=true --set values.tracing.provider=zipkin > istio-demo-with-zipkin.yaml
$ istioctl manifest generate --set profile=demo > istio-demo.yaml

然后比较它们以查看这些参数修改后的差异。

$ istioctl manifest diff istio-demo.yaml istio-demo-with-zipkin.yaml
Differences of manifests are:


Object ConfigMap:istio-system:istio-sidecar-injector has diffs:

data:
  values:
    tracing:
      provider: jaeger -> zipkin


Object Deployment:istio-system:istio-tracing has diffs:

metadata:
  labels:
    app: jaeger -> zipkin
spec:
  selector:
    matchLabels:
      app: jaeger -> zipkin
  template:
    metadata:
      annotations:
        prometheus.io/port: 14269 ->
        prometheus.io/scrape: true ->
      labels:
        app: jaeger -> zipkin
    spec:
      containers:
        '[?->0]': -> map[env:[map[name:POD_NAMESPACE valueFrom:map[fieldRef:map[apiVersion:v1
          fieldPath:metadata.namespace]]] map[name:QUERY_PORT value:9411] map[name:JAVA_OPTS
          value:-XX:ConcGCThreads=2 -XX:ParallelGCThreads=2 -Djava.util.concurrent.ForkJoinPool.common.parallelism=2
          -Xms700M -Xmx700M -XX:+UseG1GC -server] map[name:STORAGE_METHOD value:mem]
          map[name:ZIPKIN_STORAGE_MEM_MAXSPANS value:500000]] image:docker.io/openzipkin/zipkin:2.14.2
          imagePullPolicy:IfNotPresent livenessProbe:map[initialDelaySeconds:200 tcpSocket:map[port:9411]]
          name:zipkin ports:[map[containerPort:9411]] readinessProbe:map[httpGet:map[path:/health
          port:9411] initialDelaySeconds:200] resources:map[limits:map[cpu:300m memory:900Mi]
          requests:map[cpu:150m memory:900Mi]]]
        '[0->?]': map[env:[map[name:POD_NAMESPACE valueFrom:map[fieldRef:map[apiVersion:v1
          fieldPath:metadata.namespace]]] map[name:BADGER_EPHEMERAL value:false] map[name:SPAN_STORAGE_TYPE
          value:badger] map[name:BADGER_DIRECTORY_VALUE value:/badger/data] map[name:BADGER_DIRECTORY_KEY
          value:/badger/key] map[name:COLLECTOR_ZIPKIN_HTTP_PORT value:9411] map[name:MEMORY_MAX_TRACES
          value:50000] map[name:QUERY_BASE_PATH value:/jaeger]] image:docker.io/jaegertracing/all-in-one:1.14
          imagePullPolicy:IfNotPresent livenessProbe:map[httpGet:map[path:/ port:14269]]
          name:jaeger ports:[map[containerPort:9411] map[containerPort:16686] map[containerPort:14250]
          map[containerPort:14267] map[containerPort:14268] map[containerPort:14269]
          map[containerPort:5775 protocol:UDP] map[containerPort:6831 protocol:UDP]
          map[containerPort:6832 protocol:UDP]] readinessProbe:map[httpGet:map[path:/
          port:14269]] resources:map[requests:map[cpu:10m]] volumeMounts:[map[mountPath:/badger
          name:data]]] ->
      volumes: '[map[emptyDir:map[] name:data]] ->'


Object Service:istio-system:jaeger-agent is missing in B:



Object Service:istio-system:jaeger-collector is missing in B:



Object Service:istio-system:jaeger-query is missing in B:



Object Service:istio-system:tracing has diffs:

metadata:
  labels:
    app: jaeger -> zipkin
spec:
  ports:
    '[0]':
      targetPort: 16686 -> 9411
  selector:
    app: jaeger -> zipkin


Object Service:istio-system:zipkin has diffs:

metadata:
  labels:
    app: jaeger -> zipkin
spec:
  selector:
    app: jaeger -> zipkin

您可以尝试手动修改那些已应用的设置或将其应用于您的集群。

我用来生成这些清单的 Istioctl:

$ istioctl version
client version: 1.4.3
control plane version: 1.4.3
data plane version: 1.4.3 (4 proxies)

希望对您有所帮助。