Skip to content

[bitnam/kafka] Helm upgrade failed #32635

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

Closed
RogerTaylor130 opened this issue Mar 27, 2025 · 1 comment
Closed

[bitnam/kafka] Helm upgrade failed #32635

RogerTaylor130 opened this issue Mar 27, 2025 · 1 comment
Assignees
Labels
kafka solved tech-issues The user has a technical issue about an application

Comments

@RogerTaylor130
Copy link

RogerTaylor130 commented Mar 27, 2025

Name and Version

bitnam/kafka 32.0.1

What architecture are you using?

None

What steps will reproduce the bug?

I am not sure how exactly this upgrade failed. What I did was just change some fields in the values.yaml then install and upgrade it.

Maybe?:
I ran helm install in Directory A then moved the kafka files to Directory B to upgrade it?

Are you using any custom parameters or values?

I changed the following fields in values.yaml:

  • Images for all required image: pull from my private harbor repo(The first install)
  • External access section to enable NodePort access for agents outside the cluster(Upgrade failed)

What is the expected behavior?

Upgrade successfully.

What do you see instead?

$ ls
Chart.lock  charts  Chart.yaml  README.md  templates  values.yaml
$ pwd
/root/test/dv/DevOps-Practice/kafka/deploy/kafka-helm-32.0.1
$ helm upgrade kafka-helm .
Error: UPGRADE FAILED: execution error at (kafka/templates/controller-eligible/statefulset.yaml:42:38):
PASSWORDS ERROR: The secret "kafka-helm-kraft" does not contain the key "controller-{{ $i }}-id"

Image

$ k get secrets | grep kaf
kafka-helm-kraft                                Opaque                                4      31h
kafka-helm-user-passwords                       Opaque                                4      31h
sh.helm.release.v1.kafka-helm.v1                helm.sh/release.v1                    1      31h
$ k get secrets kafka-helm-kraft -oyaml
apiVersion: v1
data:
  cluster-id: T1VVWEJrbURBNUd1NXFEMTdkUVVnRQ==
  controller-0-id: cE1MeWJLTmdVZUtrTk1pOEF4eUVYeA==
  controller-1-id: VXpUR0ltSTZjc25FYVR3QUt0TmFNbw==
  controller-2-id: dHFBQzltdXJXN0NqTUptaVpHOUlGaA==
kind: Secret
metadata:
  annotations:
    meta.helm.sh/release-name: kafka-helm
    meta.helm.sh/release-namespace: default
  creationTimestamp: "2025-03-26T02:23:47Z"
  labels:
    app.kubernetes.io/instance: kafka-helm
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: kafka
    app.kubernetes.io/version: 4.0.0
    helm.sh/chart: kafka-32.0.1
  name: kafka-helm-kraft
  namespace: default
  resourceVersion: "135312353"
  uid: d535ab04-3f50-49d7-a7b1-0789a91ee51c
type: Opaque

Additional information

[root@k8s-2 kafka-helm-32.0.1]# k get no -owide
NAME       STATUS   ROLES           AGE    VERSION   INTERNAL-IP     EXTERNAL-IP   OS-IMAGE                KERNEL-VERSION                CONTAINER-RUNTIME
asicgcov   Ready    <none>          156d   v1.28.0   10.35.20.117    <none>        CentOS Linux 8          4.18.0-348.el8.x86_64         containerd://1.6.31
k8s-2      Ready    lab             685d   v1.28.0   192.168.38.89   <none>        CentOS Linux 7 (Core)   3.10.0-1160.90.1.el7.x86_64   containerd://1.6.21
k8s-4      Ready    auto            585d   v1.28.0   192.168.39.22   <none>        CentOS Linux 7 (Core)   3.10.0-1160.el7.x86_64        containerd://1.6.21
server     Ready    control-plane   690d   v1.28.0   192.168.39.6    <none>        CentOS Linux 7 (Core)   3.10.0-1160.90.1.el7.x86_64   containerd://1.6.21

$ helm list | grep kafka
kafka-helm              default         1               2025-03-26 10:23:46.058425999 +0800 CST deployed        kafka-32.0.1            4.0.0

$ k get svc | grep ka
kafka-helm                       ClusterIP   10.107.130.201   <none>        9092/TCP                                    31h
kafka-helm-controller-headless   ClusterIP   None             <none>        9094/TCP,9092/TCP,9093/TCP                  31h

$ k get po | grep ka
kafka-helm-controller-0                         1/1     Running   1 (11h ago)     31h
kafka-helm-controller-1                         1/1     Running   3 (16h ago)     31h
kafka-helm-controller-2                         1/1     Running   4 (8h ago)      31h

$ k get pv | grep ka
kafka-pv-0                 20Gi       RWO            Retain           Bound       default/data-kafka-helm-controller-1                                                        31h
kafka-pv-1                 20Gi       RWO            Retain           Bound       default/data-kafka-helm-controller-2                                                        31h
kafka-pv-2                 20Gi       RWO            Retain           Bound       default/data-kafka-helm-controller-0                                                        31h

$ k get pvc | grep ka
data-kafka-helm-controller-0              Bound    kafka-pv-2          20Gi       RWO                                    31h
data-kafka-helm-controller-1              Bound    kafka-pv-0          20Gi       RWO                                    31h
data-kafka-helm-controller-2              Bound    kafka-pv-1          20Gi       RWO                                    31h
@RogerTaylor130 RogerTaylor130 added the tech-issues The user has a technical issue about an application label Mar 27, 2025
@github-actions github-actions bot added the triage Triage is needed label Mar 27, 2025
@github-actions github-actions bot removed the triage Triage is needed label Mar 28, 2025
@github-actions github-actions bot assigned juan131 and unassigned carrodher Mar 28, 2025
@juan131
Copy link
Contributor

juan131 commented Mar 31, 2025

Duplicate of #32620, addressed at #32621

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kafka solved tech-issues The user has a technical issue about an application
Projects
None yet
Development

No branches or pull requests

3 participants