katib icon indicating copy to clipboard operation
katib copied to clipboard

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

Open tenzen-y opened this issue 4 years ago • 8 comments

/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 avatar Sep 14 '21 12:09 tenzen-y

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

gaocegege avatar Sep 15 '21 02:09 gaocegege

@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.

tenzen-y avatar Sep 15 '21 07:09 tenzen-y

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

gaocegege avatar Sep 15 '21 07:09 gaocegege

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

https://github.com/kubeflow/katib/pull/1662#discussion_r706447432

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.

tenzen-y avatar Sep 15 '21 08:09 tenzen-y

Yes, I agree. SGTM

gaocegege avatar Sep 15 '21 08:09 gaocegege

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

https://github.com/kubernetes/kubernetes/pull/105405

tenzen-y avatar Oct 29 '21 14:10 tenzen-y

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[bot] avatar Mar 02 '22 09:03 stale[bot]

/lifecycle frozen

tenzen-y avatar Mar 02 '22 16:03 tenzen-y