Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kafka chart not labeled with "app.kubernetes.io/component" as specified in instructions. #30602

Open
rshap91 opened this issue Nov 23, 2024 · 0 comments
Assignees
Labels
tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@rshap91
Copy link

rshap91 commented Nov 23, 2024

Name and Version

bitnami/kafka 31.0.0

What architecture are you using?

arm64

What steps will reproduce the bug?

  1. Running locally on apple macbook pro M1 with kubernetes on docker desktop.
>> kubectl version
Client Version: v1.29.2
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.29.2

>> docker version
Client:
 Version:           27.0.3
 API version:       1.46
 Go version:        go1.21.11
 Git commit:        7d4bcd8
 Built:             Fri Jun 28 23:59:41 2024
 OS/Arch:           darwin/arm64
 Context:           desktop-linux

Server: Docker Desktop 4.32.0 (157355)
 Engine:
  Version:          27.0.3
  API version:      1.46 (minimum version 1.24)
  Go version:       go1.21.11
  Git commit:       662f78c
  Built:            Sat Jun 29 00:02:44 2024
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.7.18
  GitCommit:        ae71819c4f5e67bb4d5ae76a6b735f29cc25774e
 runc:
  Version:          1.7.18
  GitCommit:        v1.1.13-0-g58aa920
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
  1. Created file local.yaml:
externalAccess:
  enabled: true
  controller:
    service:
      type: NodePort
      useHostIPs: true
      nodePorts:
        - 30001
        - 30002
        - 30003
  1. To reproduce:
>> helm repo add bitnami https://charts.bitnami.com/bitnami
>> helm pull --untar bitnami/kafka
>> cd kafka

move the local.yaml file to ./values/local.yaml

Run helm install -f values/local.yaml kafka .

The following message was printed to stdout

...
To connect to your Kafka controller+broker nodes from outside the cluster, follow these instructions:
    Kafka brokers domain: You can get the external node IP from the Kafka configuration file with the following commands (Check the EXTERNAL listener)

        1. Obtain the pod name:

        ***kubectl get pods --namespace default -l "app.kubernetes.io/name=kafka,app.kubernetes.io/instance=kafka,app.kubernetes.io/component=kafka"***

        2. Obtain pod configuration:

        kubectl exec -it KAFKA_POD -- cat /opt/bitnami/kafka/config/server.properties | grep advertised.listeners
    Kafka brokers port: You will have a different node port for each Kafka broker. You can get the list of configured node ports using the command below:

        echo "$(kubectl get svc --namespace default -l "app.kubernetes.io/name=kafka,app.kubernetes.io/instance=kafka,app.kubernetes.io/component=kafka,pod" -o jsonpath='{.items[*].spec.ports[0].nodePort}' | tr ' ' '\n')"

The EXTERNAL listener for Kafka client connections from within your cluster have been configured with the following settings:
    - SASL authentication
...
  1. Running kubectl get pods --namespace default -l "app.kubernetes.io/name=kafka,app.kubernetes.io/instance=kafka,app.kubernetes.io/component=kafka" produces no results.

The pods created are

  • kafka-controller-0
  • kafka-controller-1
  • kafka-controller-2

and they all have the label "app.kubernetes.io/component"="controller-eligible".

Are you using any custom parameters or values?

externalAccess:
  enabled: true
  controller:
    service:
      type: NodePort
      useHostIPs: true
      nodePorts:
        - 30001
        - 30002
        - 30003

What is the expected behavior?

I'm not sure if the pods should be labeled with "app.kubernetes.io/component"="kafka" or the instructions should be changed. Consequently I'm unable to connect to the kafka cluster "externally" (from my macs terminal) though I'm not sure if this is because of docker desktop setup or because the service selector is using the wrong label.

>> kubectl describe svc kafka-controller-0-external
...
    app.kubernetes.io/component=kafka
...

What do you see instead?

No pods are selected

Additional information

No response

@rshap91 rshap91 added the tech-issues The user has a technical issue about an application label Nov 23, 2024
@github-actions github-actions bot added the triage Triage is needed label Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
Development

No branches or pull requests

2 participants