I updated the image used after making a new version of my app, I used the command:
kubectl set image deployment/flaskapp flaskapp=username/flaskapp:5 --record
In my first deployment yml file, I used the same name for the deployment, template and containers. Here is the description of the new pod:
Normal Pulling 32m kubelet, ip-192-168-59-27.us-west-2.compute.internal Pulling image "scientronic92/flaskapp:5"
Normal Pulled 32m kubelet, ip-192-168-59-27.us-west-2.compute.internal Successfully pulled image "scientronic92/flaskapp:5"
Normal Created 32m kubelet, ip-192-168-59-27.us-west-2.compute.internal Created container flaskapp
Normal Started 32m kubelet, ip-192-168-59-27.us-west-2.compute.internal Started container flaskapp
I am using aws loadbalancer, and when I curl the url or using my browser it shows me the same old result.
Note that I tested the new uploaded docker image locally and it worked fine.
The problem was in tagging and uploading docker image!
I was using:
docker tag flaskapp:4.0 scientronic92/flaskapp:5
instead of:
docker tag flaskapp:5.0 scientronic92/flaskapp:5