Ckad mock exam 2, ex 16

On Exercise 16 which asks that you create a pod with memory limits, and then run a command which pushes on those limits, I was marked
for:

“Is correct argument used?”

my yaml:

student-node ~ ➜  more ex16
apiVersion: v1
kind: Pod
metadata:
  creationTimestamp: null
  labels:
    run: ckad15-memory
  name: ckad15-memory
spec:
  containers:
  - image: polinux/stress
    name: ckad15-memory
    command:
    - /bin/sh
    - -c
    - stress --vm 1 --vm-bytes 10M --vm-hang 1
    resources:
      requests:
        memory: 10Mi
      limits:
        memory: 10Mi
  dnsPolicy: ClusterFirst
  restartPolicy: Always
status: {}

What should it have been for a passing mark?

Hi @mks310

The stress command receives different args, this is where your command is off.

The exercise asks for these arguments:

["--vm", "1", "--vm-bytes", "10M", "--vm-hang", "1"]

I passed in:

--vm 1 --vm-bytes 10M --vm-hang 1

What are you saying is incorrect?

Your Command looks like this, with all the different args and the command as one element of the list.

Command:
-  stress --vm 1 --vm-bytes 10M --vm-hang 1

Whereas it needs to be

    command:
    - "stress"   # Executable command
    args:    # All args as separate elements of the list
    - "--vm"
    - "1"
    - "--vm-bytes"
    - "10M"
    - --vm-hang"
    - "1"

Both ways work, they could be chopped up even differently and still work.
Why would the first way not be acceptable?

If the outcome is the same, wasn’t the objective of the task achieved?
Is that how the CKAD exam grades?