-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
Revise “Container runtimes” page in light of dockershim removal #30882
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -16,7 +16,7 @@ what is involved and describes related tasks for setting up nodes. | |||||||||||||||||||||||||||||||||||||||||||
<!-- body --> | ||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
Kubernetes {{< skew currentVersion >}} requires that you use a runtime that | ||||||||||||||||||||||||||||||||||||||||||||
conforms with the | ||||||||||||||||||||||||||||||||||||||||||||
conforms with the | ||||||||||||||||||||||||||||||||||||||||||||
{{< glossary_tooltip term_id="cri" text="Container Runtime Interface">}} (CRI). | ||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
See [CRI version support](#cri-versions) for more information. | ||||||||||||||||||||||||||||||||||||||||||||
|
@@ -29,6 +29,19 @@ Kubernetes, on Linux: | |||||||||||||||||||||||||||||||||||||||||||
- [Docker Engine](#docker) | ||||||||||||||||||||||||||||||||||||||||||||
- [Mirantis Container Runtime](#mcr) | ||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
{{< note >}} | ||||||||||||||||||||||||||||||||||||||||||||
Dockershim, the portion of code in Kubernetes that provided direct | ||||||||||||||||||||||||||||||||||||||||||||
integration with Docker in prior releases, was removed from Kubernetes | ||||||||||||||||||||||||||||||||||||||||||||
version 1.24. This removal was announced as a [deprecation in Kubernetes v 1.20]( | ||||||||||||||||||||||||||||||||||||||||||||
/blog/2020/12/08/kubernetes-1-20-release-announcement/#dockershim-deprecation) | ||||||||||||||||||||||||||||||||||||||||||||
You can check out this [documentation]( | ||||||||||||||||||||||||||||||||||||||||||||
/docs/tasks/administer-cluster/migrating-from-dockershim/check-if-dockershim-deprecation-affects-you/) | ||||||||||||||||||||||||||||||||||||||||||||
to understand how this deprecation might affect you. To migrate from | ||||||||||||||||||||||||||||||||||||||||||||
dockershim you can follow [this migration guide]( | ||||||||||||||||||||||||||||||||||||||||||||
/docs/tasks/administer-cluster/migrating-from-dockershim/) | ||||||||||||||||||||||||||||||||||||||||||||
to migrate from dockershim. | ||||||||||||||||||||||||||||||||||||||||||||
{{< /note >}} | ||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
{{< note >}} | ||||||||||||||||||||||||||||||||||||||||||||
For other operating systems, look for documentation specific to your platform. | ||||||||||||||||||||||||||||||||||||||||||||
{{< /note >}} | ||||||||||||||||||||||||||||||||||||||||||||
|
@@ -151,10 +164,11 @@ Install containerd: | |||||||||||||||||||||||||||||||||||||||||||
{{< tabs name="tab-cri-containerd-installation" >}} | ||||||||||||||||||||||||||||||||||||||||||||
{{% tab name="Linux" %}} | ||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
1. Install the `containerd.io` package from the official Docker repositories. | ||||||||||||||||||||||||||||||||||||||||||||
Instructions for setting up the Docker repository for your respective Linux distribution and | ||||||||||||||||||||||||||||||||||||||||||||
installing the `containerd.io` package can be found at | ||||||||||||||||||||||||||||||||||||||||||||
[Install Docker Engine](https://docs.docker.com/engine/install/#server). | ||||||||||||||||||||||||||||||||||||||||||||
1. Install the `containerd.io` package from the [official containerd website]( | ||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are no "containerd.io" packages on the containerd.io website, there it just called "containerd" (and no packages) The alternative (to "containerd") would be "cri-containerd-cni" which also includes the CRI and CNI configuration:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where does the package name There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sftim cri-containerd-cni is a tarball, recommended as a way to install containerd by the containerd documentation: https://containerd.io/docs/getting-started/#starting-containerd +1 for not mentioning containerd.io package. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. makes sense to link to https://containerd.io/downloads/ and https://containerd.io/docs/getting-started/#starting-containerd There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @afbjorklund installing CNI can cause hard to debug issues. I'd recommend to install containerd from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this guide was referencing container runtimes previously IIRC. So, I always followed first guide and it worked for me. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is a somewhat complex topic...
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor packaging detail: runc is bundled with "containerd.io" and with "cri-containerd", there is no "runc.io" package. There is a regular system "runc" package, that is a dependency of the regular system "containerd" package though. The docker packages are basically internal to docker, they could change (and have changed before) at any time. Haven't looked at the rpm packaging (this was deb), but assume there is a similar vendor vs. system duplication ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For SIG Docs: we want to be as generic as we can be about third-party solutions. Even if someone uses containerd, we don't know what OCI runtime they prefer. Feedback on this PR should be aimed at helping the author, @PranshuSrivastava, get this ready for merge. For any other discussion, use issues or Slack. Also:
(that's a @PranshuSrivastava the feedback I'd highlight for you here is: #30882 (comment) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sftim nod.. and for the CNI/networking discussion, rather than trying to go into detail here.., it makes sense to link to /docs/concepts/cluster-administration/networking/ |
||||||||||||||||||||||||||||||||||||||||||||
https://containerd.io/downloads/).Instructions for setting up the Docker | ||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You don't need to set up the Docker package repository, if installing from containerd.io. So either you install the "containerd.io" package from Docker, or you install the "containerd" If you want to keep both options (docker.com and containerd.io), they need to be clearly separated. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should remove the docker repository from the containerd steps and leave the user two options:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it be possible to supply deb packages for containerd and runc, the same way as for "cri-tools" and "kubernetes-cni" ? From apt.kubernetes.io, that is. They would still need to be configured, but at least wouldn't have to juggle tarballs (and version and arch) Or are the system ones OK ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The package management in k8s needs to be community owned. Currently Google still holds the keys. But also some reorganization of the package repositories might be required for better version flexibility. These efforts are WIP. The containerd maintainers can open a discussion about that with the k8s SIG Release. In the meantime we should document the best existing options, IMO. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
That's a decision / discussion to happen outside of tech docs. In k/website, we document existing behavior most of all and rarely look to document or decide on future changes. It's fine to plan to document the next release before it comes out, of course. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @PranshuSrivastava I recommend following the approach outlined in #30882 (comment) @afbjorklund, I'm keen to keep the focus of this PR on just the set of changes we'd make to this page so that the v1.24 docs make sense after the dockershim component is removed. Once this merges, we can consider follow-up PRs that make further improvements. As the proverb doesn't quite say, the perfect is the enemy of the merged. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think changing from docker.com to containerd.io would be enough. It also saves the extra step of having to wipe the containerd config (that disables the cri plugin which is required)
This is done to remove the When installing containerd from upstream, then this Docker-specific configuration file is not included anymore... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we keep containerd installation instructions as they are as they're not actually related to the purpose of this PR? We can update them in a separate PR I believe. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After we remove the dockershim, the current instructions are too likely to confuse people. I think fixing that does align with the intent of this PR. |
||||||||||||||||||||||||||||||||||||||||||||
repository for your respective Linux distribution and | ||||||||||||||||||||||||||||||||||||||||||||
installing the `containerd.io` package can be found at | ||||||||||||||||||||||||||||||||||||||||||||
[Install Docker Engine](https://docs.docker.com/engine/install/#server). | ||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
2. Configure containerd: | ||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
|
@@ -172,7 +186,7 @@ installing the `containerd.io` package can be found at | |||||||||||||||||||||||||||||||||||||||||||
{{% /tab %}} | ||||||||||||||||||||||||||||||||||||||||||||
{{% tab name="Windows (PowerShell)" %}} | ||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
Start a Powershell session, set `$Version` to the desired version (ex: `$Version="1.4.3"`), | ||||||||||||||||||||||||||||||||||||||||||||
Start a Powershell session, set `$Version` to the desired version (ex: `$Version=1.4.3`), | ||||||||||||||||||||||||||||||||||||||||||||
and then run the following commands: | ||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
1. Download containerd: | ||||||||||||||||||||||||||||||||||||||||||||
|
@@ -299,7 +313,7 @@ sudo apt-get install cri-o cri-o-runc | |||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
{{% tab name="Ubuntu" %}} | ||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
To install on the following operating systems, set the environment variable `OS` | ||||||||||||||||||||||||||||||||||||||||||||
To install on the following operating systems, set the environment variable `OS` | ||||||||||||||||||||||||||||||||||||||||||||
to the appropriate field in the following table: | ||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
| Operating system | `$OS` | | ||||||||||||||||||||||||||||||||||||||||||||
|
@@ -335,7 +349,7 @@ sudo apt-get install cri-o cri-o-runc | |||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
{{% tab name="CentOS" %}} | ||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
To install on the following operating systems, set the environment variable `OS` | ||||||||||||||||||||||||||||||||||||||||||||
To install on the following operating systems, set the environment variable `OS` | ||||||||||||||||||||||||||||||||||||||||||||
to the appropriate field in the following table: | ||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
| Operating system | `$OS` | | ||||||||||||||||||||||||||||||||||||||||||||
|
@@ -416,10 +430,8 @@ in sync. | |||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
### Docker Engine {#docker} | ||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
Docker Engine is the container runtime that started it all. Formerly known just as Docker, | ||||||||||||||||||||||||||||||||||||||||||||
this container runtime is available in various forms. | ||||||||||||||||||||||||||||||||||||||||||||
[Install Docker Engine](https://docs.docker.com/engine/install/) explains your options | ||||||||||||||||||||||||||||||||||||||||||||
for installing this runtime. | ||||||||||||||||||||||||||||||||||||||||||||
On each of your nodes, install Docker for your Linux distribution as per | ||||||||||||||||||||||||||||||||||||||||||||
[Install Docker Engine](https://docs.docker.com/engine/install/#server). | ||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
Docker Engine is directly compatible with Kubernetes {{< skew currentVersion >}}, using the deprecated `dockershim` component. For more information | ||||||||||||||||||||||||||||||||||||||||||||
and context, see the [Dockershim deprecation FAQ](/dockershim). | ||||||||||||||||||||||||||||||||||||||||||||
|
@@ -428,7 +440,10 @@ You can also find third-party adapters that let you use Docker Engine with Kuber | |||||||||||||||||||||||||||||||||||||||||||
through the supported {{< glossary_tooltip term_id="cri" text="Container Runtime Interface">}} | ||||||||||||||||||||||||||||||||||||||||||||
(CRI). | ||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
The following CRI adaptors are designed to work with Docker Engine: | ||||||||||||||||||||||||||||||||||||||||||||
{{< note >}} | ||||||||||||||||||||||||||||||||||||||||||||
`overlay2` is the preferred storage driver for systems running Linux kernel version 4.0 or higher, | ||||||||||||||||||||||||||||||||||||||||||||
or RHEL or CentOS using version 3.10.0-514 and above. | ||||||||||||||||||||||||||||||||||||||||||||
{{< /note >}} | ||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
- [`cri-dockerd`](https://github.com/Mirantis/cri-dockerd) from Mirantis | ||||||||||||||||||||||||||||||||||||||||||||
Comment on lines
-431
to
448
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. SGTM |
||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM