You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we set the spec.kafka.template.pod.securityContext.runAsUser to 1000 on an existing cluster, the Kafka operator restarts the Pods with the updated the security context. However, the restarted Kafka Pods crash directly due to the following error:
2025-01-23 20:03:53,386 INFO Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation (org.apache.zookeeper.common.X509Util) [main]
All of the log directories are already formatted.
KRaft storage formatting is done
Removing quorum-state file
rm: cannot remove '/var/lib/kafka/data-0/kafka-log0/__cluster_metadata-0/quorum-state': Permission denied
We found this is because the file that Kafka is trying to remove is owned by kafka:root with permission bits set as rw-r--r--, and the kafka user has the uid of 1001. This causes the restarted Kafka Pod (with UID of 1000) to not have the sufficient permission to delete the file.
Steps to reproduce
Deploy the Kafka operator, node pool, and the Kafka CR without any SecurityContext set
Change the SecurityContext with runAsUser set as 1000
Expected behavior
The Kafka operator should be able correctly reconfigure the Kafka cluster with new security context.
This is not a Strimzi bug. It is your responsibility to make sure the user you choose to use in the security context has the required access to the files stored on the volumes.
Bug Description
When we set the
spec.kafka.template.pod.securityContext.runAsUser
to1000
on an existing cluster, the Kafka operator restarts the Pods with the updated the security context. However, the restarted Kafka Pods crash directly due to the following error:We found this is because the file that Kafka is trying to remove is owned by
kafka:root
with permission bits set asrw-r--r--
, and thekafka
user has the uid of1001
. This causes the restarted Kafka Pod (with UID of 1000) to not have the sufficient permission to delete the file.Steps to reproduce
runAsUser
set as1000
Expected behavior
The Kafka operator should be able correctly reconfigure the Kafka cluster with new security context.
Strimzi version
quay.io/strimzi/operator:0.45.0
Kubernetes version
v1.28.0
Installation method
YAML
Infrastructure
kind v0.21.0 go1.22.6 linux/amd64
Configuration files and logs
Additional context
No response
The text was updated successfully, but these errors were encountered: