-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
registry.k8s.io/liveness image in liveness example only works on AMD64 CPUs #45809
Comments
This issue is currently awaiting triage. SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
The image in question appears to have been made in 2014, almost 10 years old. Details here: |
Just noting - we have a lot of recurring issues pop up for ARM (e.g. #45420) due to tutorial images not being multi-arch. Not sure of the best way to address this holistically, but it does seem there needs to be some larger effort to either replace these tutorial instructions to only use multi-arch images, or have some process in place that maintains and keep these tutorial images up to date so they are more likely to be usable for most people. |
Thank you @stmcginnis Agreed, it would be great to have multi-architecture images as standard. I think this example also highlights another issue and that is the lack of supply chain transparency with some of the images that we readily rely on in the documentation, especially in light of recent events like xz. Prior to raising this issue, I spent considerable time unsuccessfully looking for the source code for the image in question. This example is one which I believe would be used by many, given that it's a common example for learning/using liveness/readiness probes, not to mention it being a popular topic for those with the likes of the CKAD examination. It may be worthwhile us expanding these discussions to include security provisions for efforts/improvements in this space. |
Would someone like to request that the tutorials aim to use multi-arch container images? If that's you, you can file a feature request. |
The fix for this report is to say that the example only works on AMD64 CPUs. |
Thanks for your feedback @sftim I'll update the issue as per your feedback and I would also like to pick up the feature request for this. |
@sftim - For this issue where It looks as if historically the file referenced for this was part of a bigger code base/toolset and even though it's referenced in documentation, it doesn't build as is without modifications. This is the referenced source code for the liveness image I simplified this and created an equivalent version which satisfies the test and at the same time, have built this as a multi-arch container image. Details as follows - Source Code: https://github.com/spurin/liveness Would it be acceptable for me raise a PR changing the current documentation image from registry.k8s.io/liveness to spurin/liveness or is there a specific requirement to have referenced images like this on registry.k8s.io Thanks |
I don't think we'd merge that. We prefer to reference images from a supply chain with obvious grounds that we can trust it, and in general one contributor's personal set of images doesn't pass the quality bar. How about opening a PR against https://github.com/kubernetes/kubernetes/ instead? Also see https://github.com/kubernetes/kubernetes/blob/master/test/images/agnhost/README.md |
Thanks for your candour @sftim, I thought this was the case but was also interested in this from a self learning viewpoint for some exam study so not all lost, my own personal testing image for arm in the interim :-) I found the source code for the liveness image in that subset that you've referenced but I wasn't able to find anything relating to the build of the registry.k8s.io/liveness image. In it's current form it also seems to be a module (package liveness) rather than a direct executable and I'm guessing there was some kind of additional wrapper code to get it to where it is today. It may be best, starting with the ownership/management of that registry.k8s.io/liveness image and working backwards. If you have any recommendations on who to reach out to on this I'll follow up accordingly. |
Start with #sig-release on the Kubernetes Slack (need an invitation? https://slack.k8s.io/) |
Agree with @sftim we need to switch that to the agnhost image - https://github.com/kubernetes/kubernetes/blob/master/test/images/agnhost/liveness/server.go You can see that we use this agnhost image in our conformance tests as well: Here's where we create the pod by passing liveness as an argument to the container: |
Thanks for your feedback @dims I'm unsure historically, how we got from https://github.com/kubernetes/kubernetes/blob/master/test/images/agnhost/liveness/server.go to the container image of The agnhost container image appears to be independent of this. It accepts parameters. An example is shown for liveness under the main root of that source tree -
The current readiness/liveness example in the documentation doesn't appear to be using the agnhost image in this way, it looks as if it is an independent image -
I was able to get the agnhost container image working with the liveness/readiness example with relative ease and this image is already multi-arch 👍 Here's the yaml tested successfully on arm64 -
If this is a positive direction, I can raise a PR to change the existing liveness example to use the agnhost image. Please share your thoughts. |
Yep, please go ahead with that. |
Thanks @dims - appreciate the context and background on this, makes complete sense now :-) |
Closing this, moved to agnhost image, multi-arch images as standard being discussed here - #45822 |
This is a Bug Report
Problem:
The liveness example as per https://github.com/kubernetes/website/blob/main/content/en/examples/pods/probe/http-liveness.yaml -
Makes use of image registry.k8s.io/liveness. This fails when running on arm based architectures like apple silicon.
Logs as follows when attempting to use this example -
Proposed Solution:
Ideally, this image should be updated to support multiple architectures. Sadly I've not been able to find either the source code for this image or the owner. It has been in use as a standard for many years.
Alternatively, the creation of a new multi-architecture image that can be used as a drop in replacement may be beneficial.
Page to Update:
https://github.com/kubernetes/website/blob/main/content/en/examples/pods/probe/http-liveness.yaml
The text was updated successfully, but these errors were encountered: