1

I used this helm chart for deploying redpanda to kubernetes: https://github.com/vectorizedio/helm-charts

but I have a problem with external access to kafka!

I googled about how to have an external access to redpanda from out side of kubernetes cluster and I found this documentation: https://vectorized.io/docs/kubernetes-external-connect/

but it does not work for me because it's old. currently I'm using version 1.0.6 of redpanda helm chart and the above documentation is for old version.

how can I have an external access from outside of cluster with latest helm chart version?

1 Answers1

0

You can create the new Kubernetes service with the type LoadBalancer and try to expose your service outside of Kubernetes.

By default this helm chart creating the service type ClusterIP : https://github.com/vectorizedio/helm-charts/blob/main/redpanda/templates/service.bootstrap.yaml

Step to do it :

List down all the service name

Kubectl get svc -n <namespace name if any>

copy the redpanda service YAML config and change the two fields Name and Type LoadBalancer instead of ClusterIP.

Read more about the types of service : https://kubernetes.io/docs/concepts/services-networking/service/

Another way

if you don't want to do this simply change the helm chart template YAML use it.

Might be a possible solution not worked with you due to a change in name of release or a missing namespace issue.

You can change your service type to Nodeport and Loadbalancer. Once done you can access the service externally out of the cluster.

Harsh Manvar
  • 27,020
  • 6
  • 48
  • 102
  • I did that but that's not working because kafka will return `redpanda-1.redpanda.redpanda.svc.cluster.local.:9092` to the client! the client should resolve it to an internal kubernetes ip but the client is out side of kubernetes cluster and cannot find `10.10. ...` IPs – benjamin mlk Jun 07 '21 at 11:52
  • Running the multiple listeners might resolve this issue also if you are using default `value.yaml` it's running domain on `cluster.local` check more at : https://github.com/vectorizedio/redpanda/issues/98 – Harsh Manvar Jun 07 '21 at 12:14
  • use kafka address as : `0.0.0.0:9092` – Harsh Manvar Jun 07 '21 at 12:15
  • what should be the `clusterDomain` value? I should define a DNS record in my external machine to point to which IP? could you describe it more in a post? thanks – benjamin mlk Jun 07 '21 at 13:17
  • you have to use the something like : https://github.com/vectorizedio/redpanda/issues/98#issuecomment-780779008. i am not sure helm support this or not hope you are on dev version. you can try with 0.0.0.0. – Harsh Manvar Jun 07 '21 at 14:37
  • you can see template line 103, 104 where I think changes required manually you can update it and apply the chart. https://github.com/vectorizedio/helm-charts/blob/2a8ce878648be993ac862219ec033357e932c959/redpanda/templates/statefulset.yaml#L103 – Harsh Manvar Jun 07 '21 at 14:38
  • here are so many example values needs to be passed : github.com/vectorizedio/redpanda/issues/98 – Harsh Manvar Jun 07 '21 at 14:38
  • @benjaminmlk any udpate on this or should try and share my running files ? – Harsh Manvar Jun 11 '21 at 03:56