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

Use distroless image as the base image, run Katib components as a non-root user #1664

Open
tenzen-y opened this issue Sep 14, 2021 · 8 comments

Comments

@tenzen-y
Copy link
Member

tenzen-y commented Sep 14, 2021

/kind discussion

Once the ephemeral debug containers feature is available by default, we might better change the base image from the alpine to the distroless image, run Katib components as a non-root user.

Ref:

@tenzen-y tenzen-y changed the title Use distroless image as the base image and run Katib components as a non-root user Use distroless image as the base image, run Katib components as a non-root user Sep 14, 2021
@gaocegege
Copy link
Member

Can you please explain the benefits of using distroless and non-root user in this case? Is it for security issues?

@tenzen-y
Copy link
Member Author

tenzen-y commented Sep 15, 2021

@gaocegege Thank you for your comment!

Is it for security issues?

Sure, that's one of the benefits.

Distroless is a very small image because it does not include shell, etc. I believe that making Katib components smaller is beneficial.

Besides, It does not have the image version tag such as alpine(ex. 3.7), we do not need to think about updating the image.

@gaocegege
Copy link
Member

Gotcha. As you know, there are many users which k8s is 1.14/1.16, I am not sure if it works for them.

@tenzen-y
Copy link
Member Author

I understood users using K8s <=1.16 can use an older version of Katib in the following discussion.

#1662 (comment)

I think we can say that Katib is working on Kubernetes >= 1.17
It should be fine for the community, otherwise they can use older version of Katib.

Although, I think we should discuss the time of change image because distroless image is difficult to debug without the ephemeral debug container feature.

@gaocegege
Copy link
Member

Yes, I agree. SGTM

@tenzen-y
Copy link
Member Author

This is just sharing.
The ephemeral containers feature is going to move to beta in Kubernetes v1.23.

kubernetes/kubernetes#105405

@stale
Copy link

stale bot commented Mar 2, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the lifecycle/stale label Mar 2, 2022
@tenzen-y
Copy link
Member Author

tenzen-y commented Mar 2, 2022

/lifecycle frozen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants