Adam Wilkinson:
How do I change the image on this deployment using the kubectl edit command? I have tried this but keep getting errors and there is no walk through video controlplane $ kubectl edit deployments.apps frontend simplewebapp image:kodekloud/webapp-color:v2
error: there is no need to specify a resource type as a separate argument when passing arguments in resource/name form (e.g. ‘kubectl get resource/<resource_name>’ instead of ‘kubectl get resource resource/<resource_name>’
Javier:
k edit deployment doesn’t allow change name image from command line.
Execute k edit deployment frontend it will open a text editor and you can change the name of image
If you want change from command line use k set image command
HITESH RATHOD:
try this kubectl set image deployment <deplyoment name> <container-name>=nginx:1.9.1 --record
Adam Wilkinson:
Figured it out that took 40 minutes too long!! kubectl edit deployments.apps/frontend
Jesus Arechiga Jimenez:
kubectl edit deployment frontend
while changing image through command line use
kubectl set image deployment/<deployment_name> <container_image_name>=<new_image>
Ex: kubectl set image deployment/frontend simple-webapp=kodeklou
d/webapp-color:v2
Happy Learning