-
Istio 安装配置 Kiali 仪表板
- 2023-04-06 23:06
-
字数 396
- 阅读 35
Istio 和几个遥测应用做了集成。 遥测能帮你了解服务网格的结构、展示网络的拓扑结构、分析网格的健康状态。
使用下面说明部署 Kiali 仪表板、 以及 Prometheus、 Grafana、 还有 Jaeger。1、安装 Kiali 和其他插件,等待部署完成
[root@k8s-master ~]# cd /usr/local/istio-1.15.6 [root@k8s-master istio-1.15.6]# kubectl apply -f samples/addons [root@k8s-master istio-1.15.6]# kubectl rollout status deployment/kiali -n istio-system
2、访问 Kiali 仪表板
[root@k8s-master istio-1.15.6]# istioctl dashboard kiali --address 192.168.1.59 -p 20001
http://192.168.1.59:20001/kiali
Failed to open browser; open http://192.168.1.59:20001/kiali in your browser.此时创建的 service 不提供外部访问,我们修改 service 来暴露 NodePort 以支持外部访问
[root@k8s-master istio-1.15.6]# kubectl -n istio-system edit svc kiali
在 spec.ports 的 http 节点添加 nodePort: 31001,并且修改 spec.type 的值为 NodePort,保存退出后配置生效即可通过 nodePort 端口访问 Kiali
[root@k8s-master istio-1.15.6]# kubectl -n istio-system edit svc kiali # Please edit the object below. Lines beginning with a '#' will be ignored, # and an empty file will abort the edit. If an error occurs while saving this file will be # reopened with the relevant failures. # apiVersion: v1 kind: Service metadata: annotations: kubectl.kubernetes.io/last-applied-configuration: | {"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"labels":{"app":"kiali","app.kubernetes.io/instance":"kiali","app.kubernetes.io/managed-by":"Helm","app.kubernetes.io/name":"kiali","app.kubernetes.io/part-of":"kiali","app.kubernetes.io/version":"v1.55.1","helm.sh/chart":"kiali-server-1.55.1","version":"v1.55.1"},"name":"kiali","namespace":"istio-system"},"spec":{"ports":[{"name":"http","port":20001,"protocol":"TCP"},{"name":"http-metrics","port":9090,"protocol":"TCP"}],"selector":{"app.kubernetes.io/instance":"kiali","app.kubernetes.io/name":"kiali"}}} creationTimestamp: "2023-04-06T14:45:20Z" labels: app: kiali app.kubernetes.io/instance: kiali app.kubernetes.io/managed-by: Helm app.kubernetes.io/name: kiali app.kubernetes.io/part-of: kiali app.kubernetes.io/version: v1.55.1 helm.sh/chart: kiali-server-1.55.1 version: v1.55.1 name: kiali namespace: istio-system resourceVersion: "2183945" uid: 731e8ea1-5e8a-415e-a140-b335e3b843b0 spec: clusterIP: 10.108.49.233 clusterIPs: - 10.108.49.233 internalTrafficPolicy: Cluster ipFamilies: - IPv4 ipFamilyPolicy: SingleStack ports: - name: http port: 20001 protocol: TCP targetPort: 20001 nodePort: 31001 - name: http-metrics port: 9090 protocol: TCP targetPort: 9090 selector: app.kubernetes.io/instance: kiali app.kubernetes.io/name: kiali sessionAffinity: None type: NodePort #ClusterIP status: loadBalancer: {}