Skip to content
Advertisement

how to add curr timestamp to while loop in container in pod in kubernetes?

JavaScript

This command is where i need to insert into a file “success! Wed Jun 8 20:28:01 WAST 2022”,i.e. current timestamp.

JavaScript

But it keeps writing ‘success date’

Advertisement

Answer

You could use command substitution for this. That would be in shell or bash, the same.

Additionally, you may need to escape the dollar sign, since $() has a special meaning in Kubernetes manifests.

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement