Upload ECR image into EKS

0

I wanted to create a Pod in a EKS Kubernetes Cluster containing images from a private ECR repository. Since I'm new to Kubernetes and AWS I have followed firstly this guide, and I had no problem.

Then I changed the eks-sample-deployment.yaml by substituing the image URI "public.ecr.aws/nginx/nginx:1.21" with the one I want to upload, but at the end when I run the command

$ kubectl get all -n eks-sample-app

I get the following output

NAME READY STATUS RESTARTS AGE

pod/eks-sample-linux-deployment-595499475c-cnfwp 0/1 CrashLoopBackOff 1 (8s ago) 63s

pod/eks-sample-linux-deployment-595499475c-qxsgt 0/1 CrashLoopBackOff 1 (7s ago) 63s

pod/eks-sample-linux-deployment-595499475c-sgj5m 0/1 CrashLoopBackOff 1 (8s ago) 63s

Does anyone how to solve this error?

1 Answer
0

Hello Matteo,

The CrashLoopBackOff error indicates that your pod had been started, but is failing to stay in Running state.

Whenever the container running within the pod terminates, Kubernetes will restart the container. However, after a certain number of retries, if the container is still failing, Kubernetes will stop re-trying the container creation and mark the status as CrashLoopBackOff.

You can run the kubectl describe pod <pod-name> -n <namespace> command and look for the container Exit Code to find out why the container is failing.

Before deploying the Image in EKS, try to run the docker container on your local workstation and find out if the container is able to stay in Running state.

I hope this helps. Please put a comment if you need further info.

profile pictureAWS
SUPPORT ENGINEER
answered 2 years ago
  • Thank you for your response. I have checked that my container remains in the "running" state and, for what concerns the Exit Code, I get 0 as a value. Can it be due to the fact that I have not created a CloudFormation stack?

  • The Exit Code 0 means that the process running inside the container has successfully exited. There is no issue with the container, however the process running within the container is unable to stay in Running state. Can you please provide me with the command that you used to run your docker container for testing?

  • I tried to upload the simulation application image from the AWS RoboMaker tutorial, so I have runned the command given in the Developer Guide

    $ docker run -it -v /tmp/.X11-unix/:/tmp/.X11-unix/ -u robomaker -e ROBOMAKER_GAZEBO_MASTER_URI=http://localhost:5555 -e ROBOMAKER_ROS_MASTER_URI=http://localhost:11311 \robomaker-helloworld-sim-app:latest roslaunch hello_world_simulation empty_world.launch

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions