I would like to remote debug my custom connector which is part of my Strimzi Kafka operator deployment on top of Kubernetes.
Locally (e.g. with docker image), this could be done by adding the JAVA_TOOL_OPTIONS
as an environment parameter with this value: -agentlib:jdwp=transport=dt_socket,address=*:5005,server=y,suspend=n
and expose in the docker run command the 5005 port.
However, in k8s, I should also add port 5005 to the deployment so I can use nodeport (or something else) in order to expose the deployment's debugging port (5005) outside of the cluster (so my IDE could attach to it).
But, I do not have the ability to change the exposed ports of the created Kafka connect deployment (after all, you can only apply the KafkaConnect custom resource and the deployment is created as part of it).
Is there any workaround for remote debugging this connector? Or is there some config value that Strimzi has?