'How to add configure image name as variable in deployment file in kubernetes

I am trying to create a codepipeline in aws , I am able to build my code , push image to ECR as well. then I want to rename the image in my deployment file that I have in git repo so that new deployment is created with the new image version.

Also If I keep same image then how will i deploy the deployment file in deploy stage in Kubernetes using aws codepipeline



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source