Error in Ultimate CKAD Mock Exam Series

While trying the Ultimate CKAD Mock Exam Series, i kept receiving errors

E0227 13:49:35.532717 2995 run.go:120] “command failed” err=“required flag(s) "schedule" not set”

I see this is already answered on slack, but these error messages are fairly self explanatory.

In kubectl terminology, flag means command line argument and it’s value if it needs one

  • Required flag something not set
    Means that the particular kubectl command you are trying to run is missing an argument that is required, in your case it was schedule which you give as --schedule. You cannot create a cronjob without a schedule which is why it is an error to not include it.
  • Unknown flag something
    You have put an argument which is not known to kubectl. -oyaml is wrong. The argument (or flag) is -o and its value is yaml. There needs to be a space between them