首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Azure Kubernetes - Istio访问grafana,prometheus,jaeger,kiali和特使?

Azure Kubernetes - Istio访问grafana,prometheus,jaeger,kiali和特使?
EN

Stack Overflow用户
提问于 2020-10-21 14:33:15
回答 1查看 430关注 0票数 0

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

代码语言:javascript
复制
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,我怎么做?

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

代码语言:javascript
复制
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}
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-10-22 12:14:22

我让它像下面提到的那样起作用

代码语言:javascript
复制
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}

我认为这可能不是公开服务的正确方式。相反,

创建一个Istio网关,指向https://grafana.mycompany.com

  • Create,一个Istio虚拟服务,将请求重定向到上述内部服务
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64465875

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档