Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

docs: How to upgrade bootstrap kubelet? #592

Merged
merged 1 commit into from
Aug 27, 2020

Conversation

surajssd
Copy link
Member

@surajssd surajssd commented Jun 9, 2020

Fixes #429


I have tested it with rook ceph. But not with openebs or with ingress components(metallb, contour).

@surajssd surajssd requested a review from johananl as a code owner June 9, 2020 11:30
Copy link
Member

@invidian invidian left a comment

Choose a reason for hiding this comment

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

Just some nits, otherwise looks OK.

docs/how-to-guides/upgrade-bootstrap-kubelet.md Outdated Show resolved Hide resolved
docs/how-to-guides/upgrade-bootstrap-kubelet.md Outdated Show resolved Hide resolved
docs/how-to-guides/upgrade-bootstrap-kubelet.md Outdated Show resolved Hide resolved
@surajssd surajssd force-pushed the surajssd/how-to-upgrade-bootstrap-kubelet branch from b85c680 to 1bf5758 Compare June 10, 2020 10:32
Copy link
Member

@invidian invidian left a comment

Choose a reason for hiding this comment

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

Some suggestions.

docs/how-to-guides/upgrade-bootstrap-kubelet.md Outdated Show resolved Hide resolved
docs/how-to-guides/upgrade-bootstrap-kubelet.md Outdated Show resolved Hide resolved
docs/how-to-guides/upgrade-bootstrap-kubelet.md Outdated Show resolved Hide resolved
docs/how-to-guides/upgrade-bootstrap-kubelet.md Outdated Show resolved Hide resolved
@surajssd surajssd force-pushed the surajssd/how-to-upgrade-bootstrap-kubelet branch 4 times, most recently from e167602 to 6d36bcf Compare June 29, 2020 06:36
@surajssd surajssd requested a review from invidian June 29, 2020 06:37
@@ -0,0 +1,57 @@
# How to upgrade bootstrap Kubelet
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, maybe:

Suggested change
# How to upgrade bootstrap Kubelet
# Upgrading bootstrap Kubelet

Copy link
Member

Choose a reason for hiding this comment

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

Yes, we should try to have consistent title styles for how to guides (or any other document "class" for that matter).

Also, kubelet is stylized as all lowercase.

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 am sorry I don't understand why Kubelet should be all lowercase?

For Kubernetes-related terms, follow the capitalization shown in the Kubernetes Concepts documentation.

When the style guide suggest that we follow https://kubernetes.io/docs/concepts/ and according to my search in the docs Kubelet is mentioned with caps.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Which means it is again ambiguous whether to all small on kubelet or treat it as proper noun? How does someone decide to use one over another?

docs/how-to-guides/upgrade-bootstrap-kubelet.md Outdated Show resolved Hide resolved
docs/how-to-guides/upgrade-bootstrap-kubelet.md Outdated Show resolved Hide resolved
docs/how-to-guides/upgrade-bootstrap-kubelet.md Outdated Show resolved Hide resolved
docs/how-to-guides/upgrade-bootstrap-kubelet.md Outdated Show resolved Hide resolved
Copy link
Member

@johananl johananl left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. Left comments.

@@ -0,0 +1,57 @@
# How to upgrade bootstrap Kubelet
Copy link
Member

Choose a reason for hiding this comment

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

Yes, we should try to have consistent title styles for how to guides (or any other document "class" for that matter).

Also, kubelet is stylized as all lowercase.

docs/how-to-guides/upgrade-bootstrap-kubelet.md Outdated Show resolved Hide resolved
docs/how-to-guides/upgrade-bootstrap-kubelet.md Outdated Show resolved Hide resolved

### Drain the node

> **Caution:** If you are using a local directory as a storage for a workload, it will be disturbed by this operation. So move the workload to another node and let the application replicate the data. If the application does not support data replication across instances, then expect downtime.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
> **Caution:** If you are using a local directory as a storage for a workload, it will be disturbed by this operation. So move the workload to another node and let the application replicate the data. If the application does not support data replication across instances, then expect downtime.
>**Caution:** If you are using a local directory as a storage for a workload, it will be disturbed by this operation. So move the workload to another node and let the application replicate the data. If the application does not support data replication across instances, then expect downtime.

it will be disturbed by this operation

What will be disturbed? Could you replace the word "it" with something concrete?

So move the workload

"So" after a period sounds awkward to me. I'd replace it with something like "To avoid this, ...".

If the application does not support data replication across instances, then expect downtime.

Please avoid using "then" after conditional sentences.

Copy link
Member Author

Choose a reason for hiding this comment

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

Please avoid using "then" after conditional sentences.

What should be the transition word here?

docs/how-to-guides/upgrade-bootstrap-kubelet.md Outdated Show resolved Hide resolved

Run the following commands.

> **NOTE**: Export the correct and latest Kubernetes version, before proceeding to other commands.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
> **NOTE**: Export the correct and latest Kubernetes version, before proceeding to other commands.
>NOTE: Before proceeding to other commands, set the `latest_kube` variable to the latest Kubernetes version.

I'd avoid squeezing a comment between "Run the following commands:" and the commands. Maybe this can be an inline shell comment.

Copy link
Member

Choose a reason for hiding this comment

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

What does "latest" mean? How should the user figure out which version to use?

Copy link
Member Author

Choose a reason for hiding this comment

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

What does "latest" mean? How should the user figure out which version to use?

That's a good question. There should be a way for user to know what is the latest kubernetes in lokoctl. Since this is upgrading the self-hosted kubelet it is safe to assume that user has already upgraded the control plane, so here it only way to find the lates kuberenetes version is by running kubectl version and see what version the server is at.

I think we can say somewhere in the doc that user should upgrade the control plane already. And then ask them to figure out the latest kubernetes version to upgrade kubelet to would be found by running following command:

kubectl version --short | grep ^Server | awk '{print $3}'

docs/how-to-guides/upgrade-bootstrap-kubelet.md Outdated Show resolved Hide resolved
docs/how-to-guides/upgrade-bootstrap-kubelet.md Outdated Show resolved Hide resolved
@surajssd surajssd force-pushed the surajssd/how-to-upgrade-bootstrap-kubelet branch 2 times, most recently from 729ef43 to 87ac439 Compare July 9, 2020 09:42
@surajssd surajssd force-pushed the surajssd/how-to-upgrade-bootstrap-kubelet branch 2 times, most recently from 828edec to ce7d5ab Compare August 20, 2020 08:47
docs/how-to-guides/upgrade-bootstrap-kubelet.md Outdated Show resolved Hide resolved

### Step 2: Find out the IP and SSH

Find the IP of the node by visiting the cloud provider dashboard.
Copy link
Member

Choose a reason for hiding this comment

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

I'd expect something like: Then, connect to selected machine using SSH.

Maybe instead of SSH, we could do this using privileged DaemonSet? Or using something like https://github.com/kvaps/kubectl-node-shell ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added that line. About using kubectl node-shell, I am not sure that should be a team decision to add this tool. Does it work without PSPs? What service account does it use? With webhook server if it uses default service account then it might fail, no?

Copy link
Member

@invidian invidian Aug 25, 2020

Choose a reason for hiding this comment

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

Added that line. About using kubectl node-shell, I am not sure that should be a team decision to add this tool. Does it work without PSPs? What service account does it use? With webhook server if it uses default service account then it might fail, no?

I'd expect it to spawn the pod directly on the selected node.

EDIT: yep: https://github.com/kvaps/kubectl-node-shell/blob/master/kubectl-node_shell#L49.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I wonder if the shell connection breaks if you restart the kubelet 😄 It might not be a good idea then.

docs/how-to-guides/upgrade-bootstrap-kubelet.md Outdated Show resolved Hide resolved
docs/how-to-guides/upgrade-bootstrap-kubelet.md Outdated Show resolved Hide resolved
@surajssd surajssd force-pushed the surajssd/how-to-upgrade-bootstrap-kubelet branch from ce7d5ab to 15a183a Compare August 25, 2020 10:14
Copy link
Member

@invidian invidian left a comment

Choose a reason for hiding this comment

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

LGTM. Just one question + I'd do s/Kubelet/kubelet 😄

@surajssd surajssd force-pushed the surajssd/how-to-upgrade-bootstrap-kubelet branch from 15a183a to 4fa9ea8 Compare August 26, 2020 06:12
@surajssd surajssd requested a review from invidian August 26, 2020 06:13
docs/how-to-guides/upgrade-bootstrap-kubelet.md Outdated Show resolved Hide resolved
docs/how-to-guides/upgrade-bootstrap-kubelet.md Outdated Show resolved Hide resolved
@surajssd surajssd force-pushed the surajssd/how-to-upgrade-bootstrap-kubelet branch from 4fa9ea8 to bf9669f Compare August 26, 2020 13:53
@surajssd surajssd requested a review from invidian August 26, 2020 13:53
invidian
invidian previously approved these changes Aug 26, 2020
Copy link
Member

@invidian invidian left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@ipochi ipochi left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @surajssd
Small nits.
Largely LGTM

docs/how-to-guides/upgrade-bootstrap-kubelet.md Outdated Show resolved Hide resolved
docs/how-to-guides/upgrade-bootstrap-kubelet.md Outdated Show resolved Hide resolved
docs/how-to-guides/upgrade-bootstrap-kubelet.md Outdated Show resolved Hide resolved
Signed-off-by: Suraj Deshmukh <suraj@kinvolk.io>
@surajssd surajssd force-pushed the surajssd/how-to-upgrade-bootstrap-kubelet branch from bf9669f to b90ded7 Compare August 26, 2020 14:12
@surajssd surajssd requested a review from ipochi August 26, 2020 14:28
Copy link
Member

@ipochi ipochi left a comment

Choose a reason for hiding this comment

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

LGTM 🎉

@surajssd surajssd dismissed johananl’s stale review August 27, 2020 06:54

Most of the concerns from Johannes's review were incorporated :-).

@surajssd surajssd merged commit b889093 into master Aug 27, 2020
@surajssd surajssd deleted the surajssd/how-to-upgrade-bootstrap-kubelet branch August 27, 2020 06:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document upgrades, if self hosted kubelet is disabled
4 participants