Script copy.sh shouldn't need shebang (#!) or exec permission because the
command invokes the script through the given shell. Shouldn't need to
specify the root directory, either, because according to the documentation
for ExecAction
<http://kubernetes.io/docs/api-reference/v1/definitions/#_v1_execaction>,
the command working directory is root:
"Command is the command line to execute inside the container, the working
directory for the command is root (*/*) in the container’s filesystem. The
command is simply exec’d, it is not run inside a shell, so traditional
shell instructions ('
', etc) won’t work. To use a shell, you need to explicitly call out to that
shell. Exit status of 0 is treated as live/healthy and non-zero is
unhealthy."
I'll add the root path, just in case, though.
Note that this command works when used inside a Docker image.
Derek
On Wednesday, 14 September 2016 17:54:03 UTC-4, Rodrigo Campos wrote:
>
> Probably because there is no shebang on the script? And does it have exec
> permission? The error said it didn't recognize it..
>
> Also, you don't specify the location of the script to run.
>
> You use command: [ "/bin/sh", "copy.sh" ]
>
> But probably copy.sh is not in the PATH, so you need to use "/copy.sh".
>
> Does that fix it?
>
--
You received this message because you are subscribed to the Google Groups
"Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.