简体   繁体   中英

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

I have used the following configuration to setup the 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

I want to access the services like grafana, prometheus, jaeger, kiali & envoy externally - eg: https://grafana.mycompany.com , how can I do it?

Update: I have tried below however it doesn't work

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}

I got it working as mentioned below

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}

I would assume that it may not be the right way of exposing the services. Instead

  1. Create a Istio Gateway point to https://grafana.mycompany.com
  2. Create a Istio Virtual service to redirect the requuest to the above Internal Service

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM