I am doing Lab, there i am trying to save file through OC edit command, but it is showing error.
student@workstation ~]$ oc edit deployment/hello
A copy of your changes has been stored to "/tmp/oc-edit-1fi7k.yaml"
error: Edit cancelled, no valid changes were saved.
Let us know , how to save file through oc edit command?
Seems that the changes you are doing in the deployment are being rejected when sent back to OCP.
This may be caused by many reasons, like invalid values, wrong format, etc.
Can you clarify what exact changes are you applying?
Is this issue fixed ? i am facing the same error in DO280 Guided exercise
I don't think this was an issue because it went smooth for me.
Could you please redo the exercise and share here the screenshot if you face the issue again ?
hi Chetan ,
Doing the DO280 Lab .. not sure why the edit not get succesfull . i faced the same error as reported above . Not sure any indentation issue .. i tried several times..
extract from the book .
4.1. Log in to your OpenShift cluster as the developer user.
[student@workstation ~]$ oc login -u developer -p developer
Using project "schedule-pods".
4.2. Modify the deployment resource for the hello application to select a development
node. Make sure to add the node selector the spec group in the template section.
[student@workstation ~]$ oc edit deployment/hello
Add the highlighted lines below to the deployment resource, indenting as shown.
Chapter 6 | Controlling Pod Scheduling
The following output from oc edit is displayed after you save your changes.
I again created lab and have re-executed the lab exercise without any issues.
So, it again confirms there is no issues as such in this part.
I would request you to carefully edit the file with proper indentation and ensure no other errors while editing , save the file with :wq! and it will work.
Can you match with the 3 screenshots above ?
i have shared my screenshots above which u can see the nodeSelector entry i edited correctly and when i save and exit got the error .
i did many times .. only this particular task in the whole D0280 got issue which i am unable to find the issue still .
Do you want to setup zoom session to see while i am doing the lab ?
A collaborative learning environment, enabling open source skill development.