I spent a good amount of time searching for an answer and managed to logic through to a solution that satisfied me. I know this is already answered, but perhaps it will help someone who is looking for this.
The below is an excerpt from my job.yaml
:
template:
spec:
containers:
- name: some-job
command: ["/somewhere/jre/bin/java", "-Djava.abc.handler.pkgs=util.connection", "-Dcom.abc.properties=/opt/abc/def/deployment.properties", "-cp", "/opt/abc/def/lib/jar/somejava.jar:*:.", "com.abc.def.Deployer"]
As you can see, the -Dargs
need to be specified as a whole unit, with each one separated from the other. I had to have them at the front of the command also, but that may not be required. Afterwards the rest of your command must follow the standard format.