educative.io

Error: unknown flag: --generator

I’m getting this error, not sure if --generator flag been deprecated. Could you please let me know what kubectl version I should use?
kubectl run test \
–image=alpine
–generator “run-pod/v1”
sleep 10000
Error: unknown flag: --generator
See ‘kubectl run --help’ for usage.

Hi, @Erik!

You are right. The –generator flag has been deprecated and is no longer in use. You can run the same command without the –generator flag.

We have updated the command, and the changes are live now.

Best Regards,
Faizan Zia
Technical Content Engineer