Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error updating nginx image to 1.7.1 #351

Open
dtlaycock opened this issue Feb 14, 2024 · 0 comments · May be fixed by #352
Open

Error updating nginx image to 1.7.1 #351

dtlaycock opened this issue Feb 14, 2024 · 0 comments · May be fixed by #352

Comments

@dtlaycock
Copy link

In Core Concepts we create an nginx container and expose it:
kubectl run nginx --image=nginx --restart=Never --port=80

Then in the next step set the image to be nginx:1.7.1
kubectl set image pod/nginx nginx=nginx:1.7.1

After the pod restarts it fails with an exec error:

k describe

Events:
  Type     Reason     Age                    From               Message
  ----     ------     ----                   ----               -------
  Normal   Scheduled  3m46s                  default-scheduler  Successfully assigned default/nginx to minikube
  Normal   Pulled     2m22s (x5 over 3m46s)  kubelet            Container image "nginx:1.7.1" already present on machine
  Normal   Created    2m22s (x5 over 3m46s)  kubelet            Created container nginx
  Normal   Started    2m22s (x5 over 3m46s)  kubelet            Started container nginx
  Warning  BackOff    103s (x10 over 3m44s)  kubelet            Back-off restarting failed container nginx in pod nginx_default(b2cb0485-16e1-4125-a261-a4c74f8c5b99)

k logs nginx

exec /usr/local/sbin/nginx: exec format error

Creating a pod with that image and tag also fails with the same issue:
k run nginx --image=nginx:1.7.1

1.7.1 is about 8 years old at this point and only supports amd64 architectures.

dtlaycock added a commit to dtlaycock/CKAD-exercises that referenced this issue Feb 14, 2024
On a mac m1 setting the image to 1.7.1 fails due to not supporting the arm64 architecture. Bumping the image tag to a more recent version resolves the issue.
resolves dgkanatsios#351
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant