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

Convert usages of nerdctl and crt to crictl #10907

Open
VannTen opened this issue Feb 8, 2024 · 9 comments · May be fixed by #11001
Open

Convert usages of nerdctl and crt to crictl #10907

VannTen opened this issue Feb 8, 2024 · 9 comments · May be fixed by #11001
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature.

Comments

@VannTen
Copy link
Contributor

VannTen commented Feb 8, 2024

What would you like to be added

We currently use (AFAICT):

  • ctr
  • crictl
  • nerdctl

If possible, we should use only one CRI frontend for manipulating images and containers.

Why is this needed

  1. Avoiding complexity in the playbooks and roles (usage of "command variables" such as crictl_image_pull_command, etc)
  2. Reducing the number of tasks, download and config steps.

Not sure what the pros and cons of each are. ctr looks more minimal, maybe that's enough for what we need to do in Kubespray ?
wdyt @yankay @mzaian @floryut @MrFreezeex ?

EDIT: We'll use crictl as it's required by kubeadm, and compatible with all container runtime.

Usage sites can be converted by small batch, then once the conversion is done we'll be able to remove the download of nerdctl and ctr.

@VannTen VannTen added the kind/feature Categorizes issue or PR as related to a new feature. label Feb 8, 2024
@mzaian
Copy link
Contributor

mzaian commented Feb 9, 2024

As far as I know crictl is compatible with all the container runtimes. So I would go for it.

@VannTen
Copy link
Contributor Author

VannTen commented Feb 9, 2024

Yeah and I just saw it's required by kubeadm anyway, so that's the obvious candidate

@ant31
Copy link
Contributor

ant31 commented Feb 9, 2024

Yes!

Could it be a breaking change during next upgrade for some users?

@VannTen
Copy link
Contributor Author

VannTen commented Feb 9, 2024 via email

@VannTen
Copy link
Contributor Author

VannTen commented Feb 16, 2024

/good-first-issue
/help

@k8s-ci-robot
Copy link
Contributor

@VannTen:
This request has been marked as suitable for new contributors.

Guidelines

Please ensure that the issue body includes answers to the following questions:

  • Why are we solving this issue?
  • To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
  • Does this issue have zero to low barrier of entry?
  • How can the assignee reach out to you for help?

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue command.

In response to this:

/good-first-issue
/help

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.

@k8s-ci-robot k8s-ci-robot added good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. labels Feb 16, 2024
@VannTen VannTen changed the title Keep only one CRI frontend Convert usages of nerdctl and crt to crictl Feb 16, 2024
@yankay
Copy link
Member

yankay commented Feb 18, 2024

There are significant documents to describe the difference between nerdctl and crictl. :https://www.slideshare.net/AkihiroSuda/container-plumbing-days-2023-why-was-nerdctl-made

For kubespray, using the crictl_image_pull_command as default is a good idea. It can share the same"pull image" codebase with Kubernetes .👍

As notice:

1: If the var setting is:

download_container: true
download_localhost: true

The image_pull_command_on_localhost will run in the machine "ansible localhost"; the machine may not have crictl installed.

  1. The registry mirror config of nerdctl and crictl is different.

@KubeKyrie
Copy link
Contributor

Could I try to work on this?
/assign

@VannTen
Copy link
Contributor Author

VannTen commented Mar 11, 2024 via email

@KubeKyrie KubeKyrie linked a pull request Mar 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants