You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Vladislav Keda <vl...@glowbyteconsulting.com> on 2023/06/16 13:12:07 UTC

Default Log4j properties in Native Kubernetes

Hi all!

Is it possible to change Flink* log4j-console.properties* in Native
Kubernetes (for example in Kubernetes Application mode) without rebuilding
the application docker image?

I was trying to inject a .sh script call (in the attachment) before
/docker-entrypoint.sh, but this workaround did not work (k8s gives me an
exception that the log4j* files are write-locked because there is a
configmap over them).

Is there another way to change log4j* files?

Thank you very much in advance!

Best Regards,
Vladislav Keda

Re: Default Log4j properties in Native Kubernetes

Posted by Yang Wang <wa...@apache.org>.
I assume you are using "*bin/flink run-application*" to submit a Flink
application to K8s cluster. Then you could simply
update your local log4j-console.properties, it will be shipped and mounted
to JobManager/TaskManager pods via ConfigMap.

Best,
Yang

Vladislav Keda <vl...@glowbyteconsulting.com> 于2023年6月20日周二
22:15写道:

> Hi all again!
>
> Please tell me if you can answer my question, thanks.
>
> ---
>
> Best Regards,
> Vladislav Keda
>
> пт, 16 июн. 2023 г. в 16:12, Vladislav Keda <
> vladislav.keda@glowbyteconsulting.com>:
>
>> Hi all!
>>
>> Is it possible to change Flink* log4j-console.properties* in Native
>> Kubernetes (for example in Kubernetes Application mode) without rebuilding
>> the application docker image?
>>
>> I was trying to inject a .sh script call (in the attachment) before
>> /docker-entrypoint.sh, but this workaround did not work (k8s gives me an
>> exception that the log4j* files are write-locked because there is a
>> configmap over them).
>>
>> Is there another way to change log4j* files?
>>
>> Thank you very much in advance!
>>
>> Best Regards,
>> Vladislav Keda
>>
>

Re: Default Log4j properties in Native Kubernetes

Posted by Vladislav Keda <vl...@glowbyteconsulting.com>.
Hi all again!

Please tell me if you can answer my question, thanks.

---

Best Regards,
Vladislav Keda

пт, 16 июн. 2023 г. в 16:12, Vladislav Keda <
vladislav.keda@glowbyteconsulting.com>:

> Hi all!
>
> Is it possible to change Flink* log4j-console.properties* in Native
> Kubernetes (for example in Kubernetes Application mode) without rebuilding
> the application docker image?
>
> I was trying to inject a .sh script call (in the attachment) before
> /docker-entrypoint.sh, but this workaround did not work (k8s gives me an
> exception that the log4j* files are write-locked because there is a
> configmap over them).
>
> Is there another way to change log4j* files?
>
> Thank you very much in advance!
>
> Best Regards,
> Vladislav Keda
>