-
Notifications
You must be signed in to change notification settings - Fork 49
docs: How to upgrade bootstrap kubelet? #592
Conversation
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.
Just some nits, otherwise looks OK.
b85c680
to
1bf5758
Compare
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.
Some suggestions.
e167602
to
6d36bcf
Compare
@@ -0,0 +1,57 @@ | |||
# How to upgrade bootstrap Kubelet |
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.
Hmm, maybe:
# How to upgrade bootstrap Kubelet | |
# Upgrading bootstrap Kubelet |
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.
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.
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 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.
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.
https://kubernetes.io/docs/reference/command-line-tools-reference/kubelet/ and https://kubernetes.io/docs/concepts/ both use mostly kubelet
. I think @johananl is right.
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.
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?
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 the PR. Left comments.
@@ -0,0 +1,57 @@ | |||
# How to upgrade bootstrap Kubelet |
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.
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.
|
||
### 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. |
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.
> **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.
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.
Please avoid using "then" after conditional sentences.
What should be the transition word here?
|
||
Run the following commands. | ||
|
||
> **NOTE**: Export the correct and latest Kubernetes version, before proceeding to other commands. |
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.
> **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.
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.
What does "latest" mean? How should the user figure out which version to use?
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.
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}'
729ef43
to
87ac439
Compare
828edec
to
ce7d5ab
Compare
|
||
### Step 2: Find out the IP and SSH | ||
|
||
Find the IP of the node by visiting the cloud provider dashboard. |
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'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 ?
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 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?
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 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.
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.
Oh, I wonder if the shell connection breaks if you restart the kubelet 😄 It might not be a good idea then.
ce7d5ab
to
15a183a
Compare
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.
LGTM. Just one question + I'd do s/Kubelet/kubelet
😄
15a183a
to
4fa9ea8
Compare
4fa9ea8
to
bf9669f
Compare
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.
LGTM
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 the PR @surajssd
Small nits.
Largely LGTM
Signed-off-by: Suraj Deshmukh <suraj@kinvolk.io>
bf9669f
to
b90ded7
Compare
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.
LGTM 🎉
Most of the concerns from Johannes's review were incorporated :-).
Fixes #429
I have tested it with rook ceph. But not with openebs or with ingress components(metallb, contour).