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

kubeadm: add task pages for adding Linux and Windows worker nodes #47888

Merged

Conversation

neolit123
Copy link
Member

@neolit123 neolit123 commented Sep 11, 2024

Description

Adjust the "create a kubeadm cluster" page to link to two separate task pages for adding Linux / Windows worker nodes.

Base the Windows page on the existing document:
https://github.com/kubernetes-sigs/sig-windows-tools/blob/master/guides/guide-for-adding-windows-node.md

note: this is a PR for the main branch (not dev-1.32)

Issue

Closes #44248
xref

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 11, 2024
@k8s-ci-robot k8s-ci-robot added language/en Issues or PRs related to English language size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 11, 2024
@neolit123
Copy link
Member Author

/assign @sftim @divya-mohan0209
/cc @pacoxu
for kubeadm
/cc @marosset @jsturtevant @knabben
for windows

/sig cluster-lifecycle windows docs

NOTE: i won't be able to work on this next week, but any feedback will be adjusted after that in case the PR doesn't merge this week...

@k8s-ci-robot k8s-ci-robot added the sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. label Sep 11, 2024
@k8s-ci-robot k8s-ci-robot added the sig/windows Categorizes an issue or PR as relevant to SIG Windows. label Sep 11, 2024
@k8s-ci-robot k8s-ci-robot added the sig/docs Categorizes an issue or PR as relevant to SIG Docs. label Sep 11, 2024
@neolit123
Copy link
Member Author

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 11, 2024
@neolit123 neolit123 mentioned this pull request Sep 11, 2024
31 tasks
Copy link

netlify bot commented Sep 11, 2024

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit 65107c7
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/66e28a692c09f20008e12b0e
😎 Deploy Preview https://deploy-preview-47888--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@sftim sftim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's a partial review. I don't have a Windows licence to check out the Windows part.

following commands on the control plane node:

```bash
openssl x509 -pubkey -in /etc/kubernetes/pki/ca.crt | openssl rsa -pubin -outform der 2>/dev/null | \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
openssl x509 -pubkey -in /etc/kubernetes/pki/ca.crt | openssl rsa -pubin -outform der 2>/dev/null | \
# Run this on a control plane node
sudo cat /etc/kubernetes/pki/ca.crt | openssl x509 -pubkey | openssl rsa -pubin -outform der 2>/dev/null | \

(least privilege)

Copy link
Member Author

@neolit123 neolit123 Sep 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated, minus the # Run this on a control plane node part. that is already in the prev sentence.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't block a merge, but experience confidently shows us that people don't read documentation and many people paste the commands in without reading the text in between.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, it will fail on a joining worker since the ca.crt doens't exist yet.
so then they will go back and read the prev sentence.

By default, tokens expire after 24 hours. If you are joining a node to the cluster after the current token has expired. You can create a new token by running the following command on the control plane node:

```bash
kubeadm token create
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
kubeadm token create
# Run this on a control plane node
sudo kubeadm token create

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated, minus # Run this on a control plane node. the prev sentence already mentions ...running the following command on the control plane node

Copy link
Contributor

@sftim sftim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some thoughts on the Windows part

when run on the control plane node.

Install kubectl for windows (optional)
For more information about it : https://kubernetes.io/docs/tasks/tools/install-kubectl-windows/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(at some point) make this a hyperlink.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deleted this as it was a duplicate.
already present in a new ### Install kubectl for Windows (optional) near the bottom.

By default, tokens expire after 24 hours. If you are joining a node to the cluster after the current token has expired. You can create a new token by running the following command on the control plane node:

```bash
kubeadm token create
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
kubeadm token create
# Run this on a control plane node
sudo kubeadm token create

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated, minus # Run this on a control plane node. the prev sentence already mentions it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we move the steps about creating kubeadm join tokens to install-kubeadm.md and reference that from both the windows and linux docs?
It looks like some of the docs are duplicated here

* `curl.exe` is installed and present in the `PATH` environment variable.
* A running kubeadm cluster created by `kubeadm init` and following the steps
in the document [Creating a cluster with kubeadm](/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll also need a server running Windows, and administrative access to the server (just having the license is not enough to proceed).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

attempted to reword the steps.

@sftim
Copy link
Contributor

sftim commented Sep 11, 2024

@neolit123 once you've got the feedback you'd like, you might want to mark this as draft to indicate that you think it needs more work before it can merge.

@sftim
Copy link
Contributor

sftim commented Sep 11, 2024

If you're an approver for English and you LGTM this and you need a second person to approve because this is a change to the live site: you can treat this message as grounds to approve it. The change as described above is well worth making.

@neolit123 neolit123 force-pushed the 1.32-add-linux-windows-task-pages branch 2 times, most recently from cd2cdbf to 5eddc43 Compare September 11, 2024 16:15

```PowerShell
curl.exe -LO https://raw.githubusercontent.com/kubernetes-sigs/sig-windows-tools/master/hostprocess/Install-Containerd.ps1
.\Install-Containerd.ps1 -ContainerDVersion 1.7.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.\Install-Containerd.ps1 -ContainerDVersion 1.7.1
.\Install-Containerd.ps1 -ContainerDVersion 1.7.22

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we point to the containerd runtime docs here instead? https://kubernetes.io/docs/setup/production-environment/container-runtimes/#containerd

Copy link
Member Author

@neolit123 neolit123 Sep 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i did not notice that there are windows install steps in https://kubernetes.io/docs/setup/production-environment/container-runtimes/#containerd (inside the getting started link) that's great because we can just add a prereq for a container runtime and remove this step from here.

ideally we should break the follwing into linux/windows eventually too:
https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#installing-kubeadm-kubelet-and-kubectl

and maybe have PrepareNode.ps be the install step for windows in that guide.

Copy link
Contributor

@marosset marosset Sep 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the biggest differences between those docs and what we have are

  • Checking and enabling the Hyper-V feature - which I don't think we care about for the purposes of this document
  • Setting the CNI bin and CNI config dir's in the containerd config - I think we do want this

I think if we can get the containerd docs updated to create and set the cni bin/config dirs in the containerd setup script we can move away from the containerd setup doc in sig-windows-tools.
@jsturtevant - WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree, That info should live in the containerd install doc

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i though about unrolling the install-containerd script but think i'm going to leave this task to SIG Windows. my main problem here is that i have no way to test the containerd install and CNI setup, ATM.

also, it seems out of scope of the PR.

@neolit123 neolit123 force-pushed the 1.32-add-linux-windows-task-pages branch from 5eddc43 to 04a73fc Compare September 11, 2024 18:33
@sftim
Copy link
Contributor

sftim commented Sep 11, 2024

I get the sense that this is ready for a pair (Linux, Windows) of tech LGTMs.

@pacoxu
Copy link
Member

pacoxu commented Sep 12, 2024

I get the sense that this is ready for a pair (Linux, Windows) of tech LGTMs.

Most of the Linux part is the same as before. Only some structure changes for Linux.

Overall LGTM, but I don't have enough testing or knowledge about windows node. So leave to SIG-Windows to give the LGTM.

Adjust the "create a kubeadm cluster" page to link to
two separate task pages for adding Linux / Windows worker nodes.

Base the Windows page on the existing document:
https://github.com/kubernetes-sigs/sig-windows-tools/blob/master/guides/guide-for-adding-windows-node.md
@neolit123 neolit123 force-pushed the 1.32-add-linux-windows-task-pages branch from 04a73fc to 65107c7 Compare September 12, 2024 06:29
@sftim
Copy link
Contributor

sftim commented Sep 12, 2024

@neolit123 you held this PR. When [ie, what conditions must be met] is it OK to unhold?

@neolit123
Copy link
Member Author

@neolit123 you held this PR. When [ie, what conditions must be met] is it OK to unhold?

just a precaution.
/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Sep 12, 2024
@neolit123
Copy link
Member Author

@marosset @jsturtevant please review again. looking for LGTM on the Windows side.
i think this is still an open topic but best to send it in a follow up, IMO:
#47888 (comment)

@marosset
Copy link
Contributor

LGTM for Windows steps

thanks @neolit123!

@tengqm
Copy link
Contributor

tengqm commented Sep 12, 2024

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tengqm

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 12, 2024
@sftim
Copy link
Contributor

sftim commented Sep 13, 2024

/lgtm
for docs

Tech reviews look done

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 13, 2024
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: c79b9486f57d0b75e48d2161f5b033f0ab09754e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/docs Categorizes an issue or PR as relevant to SIG Docs. sig/windows Categorizes an issue or PR as relevant to SIG Windows. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Write new task pages about creating Kubernetes nodes
8 participants