2.17.
2.17.1. 링크 복사링크가 클립보드에 복사되었습니다!
$ oc login --username=<NAMEOFUSER> https://<HOSTNAME>:6443$ oc project istio-system$ oc get routesNAME HOST/PORT SERVICES PORT TERMINATION info-gateway bookinfo-gateway-yourcompany.com istio-ingressgateway http2 grafana grafana-yourcompany.com grafana <all> reencrypt/Redirect istio-ingressgateway istio-ingress-yourcompany.com istio-ingressgateway 8080 jaeger jaeger-yourcompany.com jaeger-query <all> reencrypt kiali kiali-yourcompany.com kiali 20001 reencrypt/Redirect prometheus prometheus-yourcompany.com prometheus <all> reencrypt/Redirect
2.17.2. 링크 복사링크가 클립보드에 복사되었습니다!
2.17.3. 링크 복사링크가 클립보드에 복사되었습니다!
2.17.3.1. 링크 복사링크가 클립보드에 복사되었습니다!
$ curl "http://$GATEWAY_URL/productpage"
2.17.3.2. 링크 복사링크가 클립보드에 복사되었습니다!
2.17.3.3. 링크 복사링크가 클립보드에 복사되었습니다!
2.17.4. 링크 복사링크가 클립보드에 복사되었습니다!
2.17.4.1. 링크 복사링크가 클립보드에 복사되었습니다!
apiVersion: opentelemetry.io/v1alpha1 kind: OpenTelemetryCollector metadata: name: otel namespace: info1 spec: mode: deployment config: | receivers: otlp: protocols: grpc: endpoint: 0.0.0.0:4317 exporters: otlp: endpoint: "tempo-sample-distributor.tracing-system.svc.cluster.local:4317"2 tls: insecure: true service: pipelines: traces: receivers: [otlp] processors: [] exporters: [otlp]참고$ oc logs -n info -l app.kubernetes.io/name=otel-collectorkind: ServiceMeshControlPlane apiVersion: maistra.io/v2 metadata: name: basic namespace: istio-system spec: addons: grafana: enabled: false kiali: enabled: true prometheus: enabled: true meshConfig: extensionProviders: - name: otel opentelemetry: port: 4317 service: otel-collector.info.svc.cluster.local policy: type: Istiod telemetry: type: Istiod version: v2.6참고spec: tracing: type: NoneapiVersion: telemetry.istio.io/v1alpha1 kind: Telemetry metadata: name: mesh-default namespace: istio-system spec: tracing: - providers: - name: otel randomSamplingPercentage: 100apiVersion: kiali.io/v1alpha1 kind: Kiali # ... spec: external_services: tracing: query_timeout: 301 enabled: true in_cluster_url: 'http://tempo-sample-query-frontend.tracing-system.svc.cluster.local:16685' url: '[Tempo query frontend Route url]' use_grpc: true2 참고
2.17.4.1.1. 링크 복사링크가 클립보드에 복사되었습니다!
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: otel-disable-tls
spec:
host: "otel-collector.info.svc.cluster.local"
trafficPolicy:
tls:
mode: DISABLE
2.17.4.1.2. 링크 복사링크가 클립보드에 복사되었습니다!
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: tempo
namespace: tracing-system-mtls
spec:
host: "*.tracing-system-mtls.svc.cluster.local"
trafficPolicy:
tls:
mode: DISABLE
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: kiali
namespace: istio-system
spec:
host: kiali.istio-system.svc.cluster.local
trafficPolicy:
tls:
mode: DISABLE
2.17.4.2. 링크 복사링크가 클립보드에 복사되었습니다!
spec: addons: jaeger: name: distr-tracing-production
2.17.4.3. 링크 복사링크가 클립보드에 복사되었습니다!
spec: tracing: sampling: 100
2.17.5. 링크 복사링크가 클립보드에 복사되었습니다!
$ oc login --username=<NAMEOFUSER> https://<HOSTNAME>:6443$ oc get route -n istio-system jaeger -o jsonpath='{.spec.host}'
2.17.6. 링크 복사링크가 클립보드에 복사되었습니다!
2.17.7. 링크 복사링크가 클립보드에 복사되었습니다!
2.17.8. 링크 복사링크가 클립보드에 복사되었습니다!
apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: name: kiali-monitoring-rbac roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole name: cluster-monitoring-view subjects: - kind: ServiceAccount name: kiali-service-account namespace: istio-systemapiVersion: kiali.io/v1alpha1 kind: Kiali metadata: name: kiali-user-workload-monitoring namespace: istio-system spec: external_services: prometheus: auth: type: bearer use_kiali_token: true query_scope: mesh_id: "basic-istio-system" thanos_proxy: enabled: true url: https://thanos-querier.openshift-monitoring.svc.cluster.local:9091apiVersion: kiali.io/v1alpha1 kind: Kiali metadata: name: kiali-user-workload-monitoring namespace: istio-system spec: external_services: istio: config_map_name: istio-<smcp-name> istio_sidecar_injector_config_map_name: istio-sidecar-injector-<smcp-name> istiod_deployment_name: istiod-<smcp-name> url_service_version: 'http://istiod-<smcp-name>.istio-system:15014/version' prometheus: auth: token: secret:thanos-querier-web-token:token type: bearer use_kiali_token: false query_scope: mesh_id: "basic-istio-system" thanos_proxy: enabled: true url: https://thanos-querier.openshift-monitoring.svc.cluster.local:9091 version: v1.65
apiVersion: maistra.io/v2 kind: ServiceMeshControlPlane metadata: name: basic namespace: istio-system spec: addons: prometheus: enabled: false1 grafana: enabled: false2 kiali: name: kiali-user-workload-monitoring meshConfig: extensionProviders: - name: prometheus prometheus: {}apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: user-workload-access namespace: istio-system1 spec: ingress: - from: - namespaceSelector: matchLabels: network.openshift.io/policy-group: monitoring podSelector: {} policyTypes: - IngressapiVersion: telemetry.istio.io/v1alpha1 kind: Telemetry metadata: name: enable-prometheus-metrics namespace: istio-system1 spec: selector:2 matchLabels: app: info metrics: - providers: - name: prometheusapiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: name: istiod-monitor namespace: istio-system1 spec: targetLabels: - app selector: matchLabels: istio: pilot endpoints: - port: http-monitoring interval: 30s relabelings: - action: replace replacement: "basic-istio-system"2 targetLabel: mesh_id참고apiVersion: monitoring.coreos.com/v1 kind: PodMonitor metadata: name: istio-proxies-monitor namespace: istio-system1 spec: selector: matchExpressions: - key: istio-prometheus-ignore operator: DoesNotExist podMetricsEndpoints: - path: /stats/prometheus interval: 30s relabelings: - action: keep sourceLabels: [__meta_kubernetes_pod_container_name] regex: "istio-proxy" - action: keep sourceLabels: [__meta_kubernetes_pod_annotationpresent_prometheus_io_scrape] - action: replace regex: (\d+);(([A-Fa-f0-9]{1,4}::?){1,7}[A-Fa-f0-9]{1,4}) replacement: '[$2]:$1' sourceLabels: [__meta_kubernetes_pod_annotation_prometheus_io_port, __meta_kubernetes_pod_ip] targetLabel: __address__ - action: replace regex: (\d+);((([0-9]+?)(\.|$)){4}) replacement: $2:$1 sourceLabels: [__meta_kubernetes_pod_annotation_prometheus_io_port, __meta_kubernetes_pod_ip] targetLabel: __address__ - action: labeldrop regex: "__meta_kubernetes_pod_label_(.+)" - sourceLabels: [__meta_kubernetes_namespace] action: replace targetLabel: namespace - sourceLabels: [__meta_kubernetes_pod_name] action: replace targetLabel: pod_name - action: replace replacement: "basic-istio-system"2 targetLabel: mesh_id참고