简体   繁体   中英

Expose Pulsar broker with Kubernetes Ingress

I deployed pulsar using helm without activating tls. Now I want to expose it using a nginx ingress, without tls in a first time. It does not work, I get this on client side:

Got exception TooLongFrameException : Adjusted frame length exceeds 5253120: 1213486164 - discarded

Is missing specific annotations?

In a second time, I want to expose it in secure way using a ssl certificate. Does ingress work with pulsar+ssl protocol? Should I need specific annotation also?

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: pulsar
  namespace: default
spec:
  rules:
  - host: pulsar.myurl.com
    http:
      paths:
      - backend:
          serviceName: pulsar-proxy
          servicePort: 6650
  tls:
  - hosts:
    - pulsar.myurl.com
    secretName: pulsar.myurl.com.crt

Kubernetes ingress is for HTTP traffic. The Pulsar protocol (port 6650) is a binary protocol, not HTTP. You need to expose it using a TCP LoadBalancer service (for example, Network Load Balancer in AWS).

If you are running multiple Pulsar brokers, you should use the Pulsar proxy for external connectivity, because the Pulsar handshake assumes the client can connect to the individual brokers. The Pulsar proxy handles this complexity for you. For more details on the Pulsar proxy, see this page . You will still need to use a TCP LoadBalancer service to expose the proxy.

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