Kubernetes Nginx Ingress RabbitMQ管理和Kibana [英] Kubernetes nginx ingress rabbitmq management and kibana

查看:362
本文介绍了Kubernetes Nginx Ingress RabbitMQ管理和Kibana的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在AKS集群上,我有一个Nginx入口控制器,该控制器用于反向代理在AKS上运行的kibana服务.但是我想通过入口Rabbitmq管理控制台添加另一个http服务.

On my AKS cluster I have a Nginx ingress controller that I used to reverse proxy my kibana service running on the AKS. I want to however add another http services through the ingress, rabbitmq management console.

我无法同时使用以下配置:

I'm unable to get both to work with the following configuration:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: ingress-aegis
  namespace: dev
  annotations:
    kubernetes.io/ingress.class: nginx
    certmanager.k8s.io/cluster-issuer: letsencrypt-prod
    nginx.ingress.kubernetes.io/rewrite-target: /    
spec:
  tls:
  - hosts:
    - dev.endpoint.net
    secretName: dev-secret   
  rules:
  - host: dev.endpoint.net
    http:
      paths:
      - path: /
        backend:
          serviceName: kibana-kibana
          servicePort: 5601
      - path: /rabbit
        backend:
          serviceName: rabbitmq
          servicePort: 15672

Kibana可以在根上正常运行,但是RabbitMQ无法使用除/以外的任何路径的503加载.如果RabbitMQ的路径为/,则可以正常工作,但Kibana将无法运行.

The Kibana works fine at root however RabbitMQ fails to load with a 503 with any path except /. If RabbitMQ's path is / then it works fine but then Kibana won't run.

我认为这是因为它们在内部位于根aka localhost:15672上,因此它重定向到dev.endpoint.net上的/.

I assume this is because internally they are sitting on the root aka localhost:15672 so it redirects to / on dev.endpoint.net.

我如何从一个端点运行多个服务,例如Kibana和RabbitmQ?

How do I have multiple services like Kibana and RabbitmQ running from one endpoint?

推荐答案

您需要做的是将kibana的basePath设置为/kibana

What you need to do is set the basePath for kibana to /kibana

请参阅下面的网址

https://www.elastic.co/guide/zh-CN /kibana/current/settings.html

您要配置server.basePath/kibana.然后,这将解决反向代理问题,您可以将MQ直接保留在根/

You are looking to configure server.basePath to /kibana. Then this will sort the reverse proxying issues and you can keep the MQ one directly on root /

您还可以在kibana窗格中设置SERVER_BASEPATH环境变量,它将自动从该变量中选择基本路径

You can also set SERVER_BASEPATH environment variable in your kibana pod and it will automatically pick the base path from that variable

这篇关于Kubernetes Nginx Ingress RabbitMQ管理和Kibana的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆