Azure Kubernetes - Istio access grafana, prometheus, jaeger, kiali & envoy externally?



我使用了以下配置来设置Istio

cat << EOF | kubectl apply -f -
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
namespace: istio-system
name: istio-control-plane
spec:
# Use the default profile as the base
# More details at: https://istio.io/docs/setup/additional-setup/config-profiles/
profile: default
# Enable the addons that we will want to use
addonComponents:
grafana:
enabled: true
prometheus:
enabled: true
tracing:
enabled: true
kiali:
enabled: true
values:
global:
# Ensure that the Istio pods are only scheduled to run on Linux nodes
defaultNodeSelector:
beta.kubernetes.io/os: linux
kiali:
dashboard:
auth:
strategy: anonymous
components:
egressGateways:
- name: istio-egressgateway
enabled: true
EOF

我想访问grafana、prometheus、jaeger、kiali&外部特使-例如:https://grafana.mycompany.com,我该怎么做?

更新:我在下面尝试过,但它不起作用

kubectl expose service prometheus --type=LoadBalancer --name=prometheus --namespace istio-system
kubectl get svc prometheus-svc -n istio-system -o json
export PROMETHEUS_URL=$(kubectl get svc istio-ingressgateway -n istio-system  -o jsonpath="{.status.loadBalancer.ingress[0]['hostname','ip']}"):$(kubectl get svc prometheus-svc -n istio-system -o 'jsonpath={.spec.ports[0].nodePort}')
echo http://${PROMETHEUS_URL}
curl http://${PROMETHEUS_URL}

我让它按照下面提到的工作

kubectl expose service prometheus --type=LoadBalancer --name=prometheus --namespace istio-system

export PROMETHEUS_URL=$(kubectl get svc prometheus-svc -n istio-system  -o jsonpath="{.status.loadBalancer.ingress[0]['hostname','ip']}"):$(kubectl get svc prometheus-svc -n istio-system -o 'jsonpath={.spec.ports[0].port}')

echo http://${PROMETHEUS_URL}
curl http://${PROMETHEUS_URL}

我认为这可能不是公开服务的正确方式。取而代之的是

  1. 创建一个Istio网关点https://grafana.mycompany.com
  2. 创建一个Istio虚拟服务,将请求重定向到上述内部服务

最新更新