簡體   English   中英

Azure Kubernetes - Istio 從外部訪問 grafana、prometheus、jaeger、kiali 和 envoy?

[英]Azure Kubernetes - Istio accessing 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 和 envoy 等服務 - 例如: 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. 創建一個指向https://grafana.mycompany.com的 Istio 網關
  2. 創建一個 Istio 虛擬服務將請求重定向到上述內部服務

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM