Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. add validation in kubectl create if no file in directory **What this PR does / why we need it**: if no yaml or json file in a directory ``` # ./cluster/kubectl.sh create -f ../0/1 --dry-run pod "nginx" created (dry run) # ./cluster/kubectl.sh create -f ../0 error: You must provide one or more resources by argument or filename. Example resource specifications include: '-f rsrc.yaml' '--filename=rsrc.json' '<resource> <name>' '<resource>' ``` expected: ``` # ./cluster/kubectl.sh create -f ../0 error: error reading [../0]: please make sure the file extension is [.json .yaml .yml] ``` **Which issue this PR fixes**: fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
31 KiB
31 KiB