-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
Docs to change Container runtime #30141
Conversation
✔️ Deploy Preview for kubernetes-io-main-staging ready! 🔨 Explore the source changes: c38dc24 🔍 Inspect the deploy log: https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/620527a340fe330008c06208 😎 Browse the preview: https://deploy-preview-30141--kubernetes-io-main-staging.netlify.app |
Also related to #25879 |
@Debanitrkl I am not able find the new doc added with deployment preview https://deploy-preview-30141--kubernetes-io-main-staging.netlify.app/docs/tasks/administer-cluster/migrating-from-dockershim/ |
you need to add contents in the format used here https://github.com/kubernetes/website/pull/25787/files |
I guess this is because it's still a WIP |
I think it is because of content format, update the content format |
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.
Overall if we can add more description on the steps and little better formatting
content/en/docs/tasks/administer-cluster/migrating-from-dockershim/Change-runtime.md
Outdated
Show resolved
Hide resolved
/cc @MadhavJivrajani |
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.
Thanks for doing this!
Deployment preview can be found here: https://deploy-preview-30141--kubernetes-io-main-staging.netlify.app/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime/
I don't have a lot of experience with docs but I have a few suggestions:
- Since this page is going to be important during 1.24 release and post that, it would really help providing context on
dockershim
in general; this can be done through linking the other two documents that are under themigrating-from-dockershim
section. - There needs to be information provided for why the said commands are necessary to be run.
- This is just a small nit but for the sake of consistency with the other files present, file name of
change-runtime
overChange-runtime
might be better.
/cc @RinkiyaKeDad
for further feedback from a docs perspective.
- finally if everything goes well remove docker | ||
``` | ||
apt purge docker-ce docker-ce-cli | ||
OR | ||
yum remove docker-ce docker-ce-cli | ||
``` |
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.
- Is this still under Windows Powershell?
- Not sure if the
OR
here is the right way to go about it. Maybe a separate code section?
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.
I didn't try this myself took it from the reference here https://kruyt.org/migrate-docker-containerd-kubernetes/. Also, I guess given the formatting style of this doc a separate code section would be better
```powershell | ||
Copy-Item -Path ".\bin\" -Destination "$Env:ProgramFiles\containerd" -Recurse -Force | ||
cd $Env:ProgramFiles\containerd\ | ||
.\containerd.exe config default | Out-File config.toml -Encoding ascii | ||
|
||
# Review the configuration. Depending on setup you may want to adjust: | ||
# - the sandbox_image (Kubernetes pause image) | ||
# - cni bin_dir and conf_dir locations | ||
Get-Content config.toml | ||
|
||
# (Optional - but highly recommended) Exclude containerd from Windows Defender Scans | ||
Add-MpPreference -ExclusionProcess "$Env:ProgramFiles\containerd\containerd.exe" | ||
``` |
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.
- I usually prefer each command to typically be its own code section (unless relevant commands can be grouped in order for the text description to explain things more effectively) with a description above it and the comments can be put as text and not as comments.
- Please use this for reference.
# (Optional - but highly recommended) Exclude containerd from Windows Defender Scans
: Please describe why this is recommended.
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.
This piece of code block has also been taken from the documentation here https://github.com/kubernetes/website/blob/main/content/en/docs/setup/production-environment/container-runtimes.md#container-runtimes, but yes I will add more descriptions to make this more clear and if required separately group them.
- restart kubelet | ||
`systemctl start kubelet` | ||
|
||
- verify pods are running | ||
Run `kubectl get nodes -o wide` and containerd appears as the runtime for the node we just changed. |
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.
- configure kubelet to use containerd
Edit the file `/var/lib/kubelet/kubeadm-flags.env` and add the containerd runtime to the flags. `--container-runtime=remote` and `--container-runtimeendpoint=unix:///run/containerd/containerd.sock"`
This is not rendered on separate lines if that was your original intent. And same for the ones below and above it as well.
Thanks for working on this! Will take a look from Docs side once the PR is ready to go and not WIP 😄 |
There is an existing page on how to use containerd |
@reylejano this docs has steps for users to shift from dockershim to containerd. The link you provided has the steps to run only containerd, it doesn't specify how to stop and drain node and then change the runtime. |
@Debanitrkl thank you, looking forward to this PR when it's ready to review |
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.
Hi. Here's some early feedback that I hope helps you make progress.
content/en/docs/tasks/administer-cluster/migrating-from-dockershim/Change-runtime.md
Outdated
Show resolved
Hide resolved
- finally if everything goes well remove docker | ||
``` | ||
apt purge docker-ce docker-ce-cli | ||
OR | ||
yum remove docker-ce docker-ce-cli | ||
``` |
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.
I would use https://kubernetes.io/docs/contribute/style/hugo-shortcodes/#tabs and have a tab for Debian-heritage systems and another for RedHat-heritage systems.
```shell | ||
sudo systemctl restart containerd | ||
``` | ||
### For windows powershell |
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.
Consider splitting this into two task pages, one for Linux nodes and one for Windows nodes.
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). |
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.
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). | |
You can find instructions for installing `containerd` at | |
[Starting Containerd](https://containerd.io/docs/getting-started/#starting-containerd). |
|
||
Install containerd: | ||
|
||
1. Install the `containerd.io` package from the official Docker repositories. |
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.
Why use the Docker repository for this? I would recommend that people fetch it from their
OS distribution or, failing that, from source and build it.
I suspect that telling people to get containerd from Docker is liable to add to the confusion.
content/en/docs/tasks/administer-cluster/migrating-from-dockershim/Change-runtime.md
Outdated
Show resolved
Hide resolved
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.
added a few comments that feel like blocking in the current draft and we should resolve them.
but thanks for working on this!
@@ -0,0 +1,115 @@ | |||
--- | |||
title: "Migrating Container runtime from dockershim to containerd" |
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.
this seems to be an opinionated suggestion for transition.
what if the user wishes to use cri-o instead of containerd?
in the CR popularity survey we did before docker was first, followed by containerd and then cri-o.
so if containerd wins here by being second, it makes sense, but cri-o might not be very happy about this.
cc @saschagrunert for feedback on CRI-O.
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.
Thanks for reaching out! I think the whole guide is opinionated to a particular setup, which is probably fine. Mentioning CRI-O as alternative container runtime to containerd would make us very happy, though. 🙃
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.
ok, i think it's worth denoting with a sentence near the top of the guide that this covers an example scenario for migrating from dockershim to containerd and that alternative container runtime such as cri-o can be picked from the https://kubernetes.io/docs/setup/production-environment/container-runtimes/ page.
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.
That sounds like a good way to head off issues around https://kubernetes.io/docs/contribute/style/content-guide/#third-party-content
We make an exception for container runtimes - these are necessary out-of-project packages that you must have to make a working Kubernetes cluster - but we don't like to be in the business of picking favorites.
content/en/docs/tasks/administer-cluster/migrating-from-dockershim/Change-runtime.md
Outdated
Show resolved
Hide resolved
### For linux systems | ||
Use the following commands to install Containerd on your system: | ||
|
||
Install and configure prerequisites: |
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.
the guide seems to be duplicating steps that already existing the in the "installing a container runtime" page:
https://kubernetes.io/docs/setup/production-environment/container-runtimes/
instead we can cross-link.
the steps can be generalized as:
- drain node
- stop kubelet
- uninstall old CR
- install new CR (CR of your chose, not picking a preference in this page, cross-link to the main CR page)
- update kubelet config and kubeadm bits (optional)
- restart kubelet
- uncordon node
- check if the node / pods work
i know that it works and i've seen users already do it, but before we merge such a guide for hotswap SIG node must tell us if this is even supported and if something unpredictable can happen. cgroup (drivers)? proper cleanup after uninstalling the old CR - logs, container state, etc?
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.
I think we do want a “dummies guide to” here, because the Docker deprecation is already worrying quite a few people.
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.
BTW please make the filename lowercase (change content/en/docs/tasks/administer-cluster/migrating-from-dockershim/Change-runtime.md
to content/en/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime.md
)
or, much better (it leaves room for alternatives):
content/en/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd.md
I have updated with some final changes and also have started a hackmd file here for ease of reviewing. |
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.
Hi @Debanitrkl
This PR is going to need some work before we can merge it. I've added suggestions and feedback inline.
if you have questions about what to write, please feel free to ask them.
content/en/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd.md
Outdated
Show resolved
Hide resolved
content/en/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd.md
Outdated
Show resolved
Hide resolved
content/en/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd.md
Outdated
Show resolved
Hide resolved
content/en/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd.md
Outdated
Show resolved
Hide resolved
content/en/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd.md
Outdated
Show resolved
Hide resolved
content/en/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd.md
Outdated
Show resolved
Hide resolved
content/en/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd.md
Outdated
Show resolved
Hide resolved
content/en/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd.md
Outdated
Show resolved
Hide resolved
content/en/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd.md
Outdated
Show resolved
Hide resolved
content/en/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd.md
Outdated
Show resolved
Hide resolved
content/en/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd.md
Outdated
Show resolved
Hide resolved
content/en/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd.md
Outdated
Show resolved
Hide resolved
content/en/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd.md
Outdated
Show resolved
Hide resolved
content/en/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd.md
Outdated
Show resolved
Hide resolved
content/en/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd.md
Outdated
Show resolved
Hide resolved
content/en/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd.md
Show resolved
Hide resolved
content/en/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd.md
Outdated
Show resolved
Hide resolved
/label tide/merge-method-squash |
content/en/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd.md
Outdated
Show resolved
Hide resolved
content/en/docs/tasks/administer-cluster/migrating-from-dockershim/change-runtime-containerd.md
Outdated
Show resolved
Hide resolved
/lgtm |
LGTM label has been added. Git tree hash: b196437c02cd1647d921d13f735357270cf3bd0d
|
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.
/approve
|
||
## Remove Docker Engine | ||
|
||
{{% thirdparty-content %}} |
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.
nit: not needed as the page already has this disclaimer
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sftim The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@sftim just a small doubt I haven't added the author and reviewer names and the dates wasn't that required |
Pretty sure those are for blog posts and not technical docs 🙂
…On Fri., Feb. 11, 2022, 08:03 Debabrata Panigrahi, ***@***.***> wrote:
@sftim <https://github.com/sftim> just a small doubt I haven't added the
author and reviewer names and the dates wasn't that required
—
Reply to this email directly, view it on GitHub
<#30141 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHH4EFWFRPJDEJG5Q4I4PF3U2UCLDANCNFSM5GJB74XQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
This adds the detailed instructions to help change container runtime to containerd.
related to kubernetes/kubernetes#104878
/assign @adisky