-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
📖 Add documentation around KubeadmControlPlane #2607
Merged
+47
−0
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Kubeadm control plane | ||
|
||
Using the Kubeadm control plane type to manage a control plane provides several ways to upgrade control plane machines. | ||
|
||
## Upgrading workload clusters | ||
|
||
The high level steps to fully upgrading a workload cluster are to first upgrade the control plane and then upgrade | ||
the worker machines. | ||
|
||
### Upgrading the control plane machines | ||
|
||
#### How to upgrade the underlying machine image | ||
|
||
To upgrade the control plane machines underlying machine images, the `MachineTemplate` resource referenced by the | ||
`KubeadmControlPlane` must be changed. Since `MachineTemplate` resources are immutable, the recommended approach is to | ||
|
||
1. Copy the existing `MachineTemplate`. | ||
2. Modify the values that need changing, such as instance type or image ID. | ||
3. Create the new `MachineTemplate` on the management cluster. | ||
4. Modify the existing `KubeadmControlPlane` resource to reference the new `MachineTemplate` resource. | ||
|
||
The final step will trigger a rolling update of the control plane using the new values found in the `MachineTemplate`. | ||
|
||
#### How to upgrade the Kubernetes control plane version | ||
|
||
To upgrade the Kubernetes control plane version, which will likely, depending on the provider, also upgrade the | ||
underlying machine image, make a modification to the `KubeadmControlPlane` resource's `Spec.Version` field. This will | ||
trigger a rolling upgrade of the control plane. | ||
|
||
Some infrastructure providers, such as [CAPA](https://github.com/kubernetes-sigs/cluster-api-provider-aws), require | ||
that if a specific machine image is specified, it has to match the Kubernetes version specified in the | ||
`KubeadmControlPlane` spec. In order to only trigger a single upgrade, the new `MachineTemplate` should be created first | ||
and then both the `Version` and `InfrastructureTemplate` should be modified in a single transaction. | ||
|
||
### Upgrading workload machines managed by a `MachineDeployment` | ||
|
||
Upgrades are not limited to just the control plane. This section is not related to Kubeadm control plane specifically, | ||
but is the final step in fully upgrading a Cluster API managed cluster. | ||
|
||
It is recommended to manage workload machines with one or more `MachineDeployment`s. `MachineDeployment`s will | ||
transparently manage `MachineSet`s and `Machine`s to allow for a seamless scaling experience. A modification to the | ||
`MachineDeployment`s spec will begin a rolling update of the workload machines. | ||
|
||
For a more in-depth look at how `MachineDeployments` manage scaling events, take a look at the [`MachineDeployment` | ||
controller documentation](../developer/architecture/controllers/machine-deployment.md) and the [`MachineSet` controller | ||
documentation](../developer/architecture/controllers/machine-set.md). |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 doc currently seems to be more around just the upgrade process. I'm wondering if it might be better to title it 'Upgrading workload clusters' and have a short blurb that the use of KubeadmControlPlane and MachineDeployment is a requirement for supported upgrades.
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 intent is that this is a place to put tasks related to kubeadm control plane. Upgrades just happen to be the most interesting feature. There should probably be some sentences about scaling up and down, fixing a busted control plane node and other tasks that kubeadm control plane allows us to do