Failed the exam as one command 'kubectl edit didnt worked there and there were r . . .

Zul:
Failed the exam as one command 'kubectl edit didnt worked there and there were requirement to edit resource in few questions.Whenever I tried to edit file and save with :wq! It throw error that “edit cancelled ,no changes were made”.It cohld not be syntax error as I tried to change even existing value e.g 10 to 20 but gave same error.

Pradeep:
You should have created an yaml file. Delete the old one and should have created the resources

Pradeep:
But, ideally it should work

Balaji K:
@Zul I think you would have edited those parameter which can’t be dynamically edited. In that case they would be saved in /tmp/xxxxxx.yaml which you could have used to delete and create again.

Zul:
@Balaji K Those parameters were editable as I confirmed after that in course labs.I tried to delete resource and recreate with that temp file but I dont think I got matks for that because exam stated to use kubectl edit command to edit those resources.

Madhan Kumar:
https://jneate.github.io/technology/2019/11/14/changing-the-default-editor-of-kubectl-edit.html|https://jneate.github.io/technology/2019/11/14/changing-the-default-editor-of-kubectl-edit.html

Madhan Kumar:
https://stackoverflow.com/questions/56811177/how-can-i-fix-edit-cancelled-no-changes-made-in-shell|https://stackoverflow.com/questions/56811177/how-can-i-fix-edit-cancelled-no-changes-made-in-shell

Madhan Kumar:
Based on what I’ve read , switching the editor to vim or nano should solve the issue . Or you can try :w and then :q separately so that the changes are saved and then you can quit …that error is due to the wait parameter .

Madhan Kumar:
https://developers.redhat.com/blog/2020/11/20/kubectl-developer-tips-for-the-kubernetes-command-line/|https://developers.redhat.com/blog/2020/11/20/kubectl-developer-tips-for-the-kubernetes-command-line/

Madhan Kumar:
https://docs.vmware.com/en/VMware-vSphere/7.0/vmware-vsphere-with-tanzu/GUID-DC2BB6E0-A327-4DB8-9A87-5F3376E70033.html|https://docs.vmware.com/en/VMware-vSphere/7.0/vmware-vsphere-with-tanzu/GUID-DC2BB6E0-A327-4DB8-9A87-5F3376E70033.html