Application lifecycle management, practice test rolling updates and rollbacks q. . . .

Aneek Bera:
APPLICATION LIFECYCLE MANAGEMENT, PRACTICE TEST ROLLING UPDATES AND ROLLBACKS
Q. 11.

root@controlplane:~# kubectl edit deploy frontend 
error: deployments.apps "frontend" is invalid
A copy of your changes has been stored to "/tmp/kubectl-edit-13275.yaml"
error: Edit cancelled, no valid changes were saved.
root@controlplane:~# kubectl edit deploy frontend 
error: deployments.apps "frontend" is invalid
A copy of your changes has been stored to "/tmp/kubectl-edit-sy9b6.yaml"
error: no original object found for &unstructured.Unstructured{Object:map[string]interface {}{"apiVersion":"apps/v1", "kind":"Deployment", "metadata":map[string]interface {}{"name":"frontend", "namespace":"default"}, "spec":map[string]interface {}{"replicas":4, "selector":map[string]interface {}{"matchLabels":map[string]interface {}{"name":"webapp"}}, "strategy":map[string]interface {}{"type":"Recreate"}, "template":map[string]interface {}{"metadata":map[string]interface {}{"labels":map[string]interface {}{"name":"webapp"}}, "spec":map[string]interface {}{"containers":[]interface {}{map[string]interface {}{"image":"kodekloud/webapp-color:v2", "name":"simple-webapp", "ports":[]interface {}{map[string]interface {}{"containerPort":8080, "protocol":"TCP"}}}}}}}}}
root@controlplane:~# 

Why is this happeneing?

unnivkn:
looks like the value you edited is not proper… could you please paste yaml here

Aneek Bera:
ok…got it…I made a mistake.

Hi I am getting error while editing yaml file
controlplane ~ :heavy_multiplication_x: kubectl edit deployment frontend
error: deployments.apps “frontend” is invalid
A copy of your changes has been stored to “/tmp/kubectl-edit-2606764719.yaml”
error: Edit cancelled, no valid changes were saved.