- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我们正在使用 Prometheus 运算符,我们需要使用 istio 公开(外部)公开 Grafana,
https://github.com/helm/charts/tree/master/stable/prometheus-operator
通常,当我有需要通过 istio 公开公开的应用程序时,我会在我的微服务 中添加如下内容它有效并暴露在外面。
服务.yaml
apiVersion: v1
kind: Service
metadata:
name: po-svc
namespace: po
spec:
ports:
- name: http
port: 3000
targetPort: 3000
selector:
app: myapp //I take the name from deployment.yaml --in the chart NOT SURE WHICH VALUE I SHOULD TAKE FROM THE CHART---
并添加一个虚拟服务
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: po-virtualservice
namespace: po
spec:
gateways:
- gw-system.svc.cluster.local
hosts:
- po.eu.trial.appos.cloud.mvn
http:
- route:
- destination:
host: po-svc
port:
number: 3000
然后我可以访问我的应用程序
公开 .
values.yaml
有服务入口
service.yaml
如果是,如何填写
app: myapp
等数据(在常规应用程序中,我从 deployment.yaml 中获取“名称”字段)作为服务引用 Grafana 应用程序的 grafana
virutalservice.yaml
有一个引用
service
(主持人:po-svc)
My question is: How should I fill those two values and be able toexpose Grafana using istio ?
LoadBalancer
如下所示,我获得了一个可以在外部访问的公共(public) url,但是我想通过 istio 公开它。
service:
portName: service
type: LoadBalancer
更新
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: po-virtualservice
namespace: po
spec:
gateways:
- gw-system.svc.cluster.local
hosts:
- po.eu.trial.appos.cloud.mvn
http:
- route:
- destination:
host: po-grafana. // This is the name of the service that promethues operator created when applying the chart .
port:
number: 3000
并更新
values.yaml喜欢以下
service:
portName: service
port: 3000
targetPort: 3000
现在,当我点击浏览器获取应用程序 url (po.eu.trial.appos.cloud.mvn) 时出现错误
upstream connect error or disconnect/reset before headers. reset reason: connection termination
知道可能是什么问题吗?我应该如何追踪这个问题?
最佳答案
istio 有一个工作示例,版本为 1.7.0
istioctl version
client version: 1.7.0
control plane version: 1.7.0
data plane version: 1.7.0 (1 proxies)
1.我用过
helm fetch获取普罗米修斯运营商。
helm fetch stable/prometheus-operator --untar
2.我在 values.yaml 中更改了这些。
service:
portName: http-service
port: 3000
targetPort: 3000
格拉法纳
host .
hosts:
- grafana.domain.com
3.我已经创建了po命名空间并安装了prometheus operator
kubectl create namespace po
helm install prometheus-operator ./prometheus-operator -n po
4.我已经检查了 grafana 服务名称
kubectl get svc -n po
prometheus-operator-grafana ClusterIP
5. Istio 使用了下面的 yamls,使用了 grafana 服务名称,即
prometheus-operator-grafana
作为我的虚拟服务和目标规则主机。
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: grafana-gateway
namespace: po
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 80
name: http-grafana
protocol: HTTP
hosts:
- "grafana.domain.com"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: grafana-vs
namespace: po
spec:
hosts:
- "grafana.domain.com"
gateways:
- grafana-gateway
http:
- route:
- destination:
host: prometheus-operator-grafana.po.svc.cluster.local
port:
number: 3000
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
name: grafana
namespace: po
spec:
host: prometheus-operator-grafana.po.svc.cluster.local
trafficPolicy:
tls:
mode: DISABLE
5.使用 curl 测试,它是 302 而不是 200,因为我们必须登录。
curl -v -H "host: grafana.domain.com" xx.xx.xxx.xxx/
GET / HTTP/1.1
> Host: grafana.domain.com
> User-Agent: curl/7.64.0
> Accept: */*
>
< HTTP/1.1 302 Found
关于kubernetes - 使用 istio 公开暴露 grafana,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63689505/
我们有一个将导出流量路由到服务网格之外的外部服务的最小示例。 apiVersion: networking.istio.io/v1alpha3 kind: ServiceEntry metadata:
如何在 istio 的目标规则中使用部分匹配的 URI? 试图实现这样的目标: apiVersion: networking.istio.io/v1alpha3 kind: VirtualServic
我看到了Istio site提到速率限制支持,但我只能找到全局速率限制示例。 是否可以在用户级别这样做?例如,如果我的用户登录但在一秒钟内发送超过 50 个请求,那么我想阻止该用户等。在类似情况下,如
这里是 VirtualService 的例子,同时使用了超时和重试。 apiVersion: networking.istio.io/v1alpha3 kind: VirtualService met
这里是 VirtualService 的例子,同时使用了超时和重试。 apiVersion: networking.istio.io/v1alpha3 kind: VirtualService met
场景 我正在使用 Istio 1.5 来自 this question我知道 Istio 使用的默认 envoy 访问日志格式,即 \[%{TIMESTAMP_ISO8601:timestamp}\]
我们已经在开发和生产环境中使用 helm-chart 部署了 Istio 1.11.0。我们在 istio configmap 中使用以下配置,我们已通过 istio-control helm-cha
文档中没有提到主体名称是如何构造的。我所说的主体是指 istio sidecar 创建的客户端证书中的名称,并且可以在规范的 from 指令中的 istio AuthorizationPolicy 对
我目前正在研究 1.6 版的服务网格 Istio。数据平面(Envoy 代理)由控制平面配置。尤其是 Pilot( istiod 的一部分)负责将路由规则和配置传播给特使。我想知道通信是如何工作的?
当用户有多个与之关联的角色时,授权持有者 token 将超过 istio 提供的最大 header 大小,从而阻止所有请求。 授权不记名 token 超过 35,000 个字符,大小为 34K。 如何
我似乎无法找到/理解如何更改 kubernetes 中 Istio 负载均衡器的默认错误登录页面。 例如 503“上游不健康”页面。 是否可以在 Istio 中更改这些?如果是这样,我将如何去做? 提
我知道您可以使用 istio 在服务没有响应时打开断路器。而不是返回 503 , 是否可以重定向到不同的 URL?同样的问题,但是当原始服务返回 500 时,我们可以重定向到另一个 URL 吗? 或者
如何为 Kubernetes 禁用 Istio sidecar 注入(inject) Job ? apiVersion: batch/v1beta1 kind: CronJob metadata:
我正在尝试让 lua envoy 过滤器与 istio 网关一起工作,但我添加到集群并且它正在工作,就好像过滤器不存在一样。 我已经使用本指南在 GKE 上配置了我的 istio 集群 https:/
我想在 kubernetes 集群中运行的不同服务之间实现 TLS 相互身份验证,我发现 Istio 是一个很好的解决方案,无需对代码进行任何更改即可实现这一目标。 我正在尝试使用 Istio sid
我正在尝试让 lua envoy 过滤器与 istio 网关一起工作,但我添加到集群并且它正在工作,就好像过滤器不存在一样。 我已经使用本指南在 GKE 上配置了我的 istio 集群 https:/
我已经使用 Helm 安装了 ISTIO。我忘了启用 grafana、kiali 和 jaeger。安装 istio 后如何启用上述所有服务? 最佳答案 这里是 howto : 来自官方仓库。 你需要
据我了解,无论如何,您的 Istio 网关前都会有一个 NLB 或 ALB? 但我很困惑,因为 Istio Gateway 似乎为 ALB 为第 7 层甚至更多做了很多事情? 所以我读了 ALB ->
我正在使用 helm 安装带有 --set grafana.enabled=true 的 istio-1.0.0 版本. 要访问 grafana 仪表板,我必须使用 kubectl 进行端口转发命令。
我已经使用 Helm 安装了 ISTIO。我忘了启用 grafana、kiali 和 jaeger。安装 istio 后如何启用上述所有服务? 最佳答案 这里是 howto : 来自官方仓库。 你需要
我是一名优秀的程序员,十分优秀!