In Mock 2 Exam Q7 below, the solution mentioned about using "kubectl run testpo . . .

Tan Soon Sian:
In Mock 2 Exam Q7 below, the solution mentioned about using “kubectl run testpod --image=busybox:1.28 -rm -it – nslookup nginx-resolver-service” parameter when creating the testpod to run nslookup command. But when I specified the “-rm” parameter, it does not accept that as a valid parameter. But if I exclude “-rm” parameter, the command runs successfully. But the only thing everytime I create testpod, I need to delete it before I can run the 2nd time to perform nslookup for the nginx-resolver pod. When I checked the doc, it does mention “rm” as a valid parameter but somehow in terminal it does not accept it. Any reason for that?

Sanjay Kumar:
@Tan Soon Sian you need to use double hyphens with rm as “—rm”

Sanjay Kumar:
@Tan Soon Sian - also you can use “—restart=Never” with the same command.

Tan Soon Sian:
oh. Thanks. Did not realize it requires double hyphens as the -it does not requires double hyphens