Why am i not able to set image using this command?

kubectl set image frontend kodekloud/webapp-color:v1=kodekloud/webapp-color:v2
error: the server doesn’t have a resource type “frontend”
root@controlplane:~# kubectl set image deployment frontend kodekloud/webapp-color:v1=kodekloud/webapp-color:v2
error: unable to find container named “kodekloud/webapp-color:v1”

@ajey, you need to provide the container name instead of the image.

kubectl set image deployment frontend simple-webapp=kodekloud/webapp-color:v2

1 Like