Note, below 2 args formats are tested and worked for shell(sh/bash), other init process may not fit, for example
tini
, you have to use array format and one token a line.
The format of command
and args
syntax in kubernetes yaml really makes me crazy, when the entrypoint has long or multiple arguments, can be wrote in multiple lines instead of one line for better view:
1 | apiVersion: v1 |
Another format:
1 | apiVersion: v1 |
The format is error-prone, every command should end with ;
, for example the while
and if
above. I separate them into several lines for good looking, but they actually are one line command.
For one command with multiple options or parameters, can be described as below, no args
field:
1 | containers: |