王子1986
王子1986

Reputation: 3609

How to make bitnami/kafka accessible from external via clusterip

On this document.

https://github.com/bitnami/charts/tree/master/bitnami/kafka

it mentioned following:

Note: the deployed ingress must contain the following block:

tcp:
  9094: "{{ .Release.Namespace }}/{{ include "kafka.fullname" . }}-0-external:9094"
  9095: "{{ .Release.Namespace }}/{{ include "kafka.fullname" . }}-1-external:9094"
  9096: "{{ .Release.Namespace }}/{{ include "kafka.fullname" . }}-2-external:9094"

what does this means? what is this configuration? is this helm chart configuration or k8s configuration?

Upvotes: 3

Views: 2094

Answers (2)

王子1986
王子1986

Reputation: 3609

I resolved this by referring to this guide.

https://minikube.sigs.k8s.io/docs/tutorials/nginx_tcp_udp_ingress/

I was missing this step

kubectl patch deployment ingress-nginx-controller --patch "$(cat ingress-nginx-controller-patch.yaml)" -n ingress-nginx

ingress-nginx-controller-patch.yaml

spec:
  template:
    spec:
      containers:
      - name: controller
        ports:
         - containerPort: 6379
           hostPort: 6379

Upvotes: 1

DBSand
DBSand

Reputation: 750

Yes, this reference points to the values.yaml of ingress controller Helm charts, there is a section where you can mention the TCP and UDP ports that you want to allow traffic to, Ingress by default does not support TCP or UDP services. For this reason this Ingress controller uses the flags --tcp-services-configmap and --udp-services-configmap to point to an existing config map where the key is the external port to use and the value indicates the service to expose using the format:

 <namespace/service name>:<service port>:[PROXY]:[PROXY] 

Ingress controller helm chart: https://github.com/kubernetes/ingress-nginx

TCP reference: https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/exposing-tcp-udp-services.md

#Ingress-nginx values.yaml sample below
# TCP service key:value pairs
tcp:
#  8080: "default/example-tcp-svc:9000"

# UDP service key:value pairs
udp: {}
#  53: "kube-system/kube-dns:53"

Upvotes: 0

Related Questions