-
Notifications
You must be signed in to change notification settings - Fork 20
docs(operations): complete CA rotation documentation #406
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
Draft
kvaps
wants to merge
1
commit into
main
Choose a base branch
from
ca-rotation-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
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 hidden or 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 |
|---|---|---|
|
|
@@ -16,55 +16,38 @@ Rotation of the root CA is only needed: | |
| - when you want to revoke access to the cluster for a leaked `talosconfig` or `kubeconfig`; | ||
| - once in 10 years. | ||
|
|
||
| ### Rotate CA for the Management Kubernetes Cluster: | ||
| ### Rotate CA for Talos API | ||
|
|
||
| To rotate the Talos CA for the management cluster, use the following command: | ||
|
|
||
| See: https://www.talos.dev/v1.9/advanced/ca-rotation/#kubernetes-api | ||
| First, run in dry-run mode to preview the changes: | ||
|
|
||
| ```bash | ||
| git clone https://github.com/cozystack/cozystack.git | ||
| cd packages/core/testing | ||
| make apply | ||
| make exec | ||
| talm -f nodes/node.yaml rotate-ca --talos=true --kubernetes=false | ||
| ``` | ||
|
|
||
| Add this to your talosconfig in a pod: | ||
|
|
||
| ```yaml | ||
| client-aenix-new: | ||
| endpoints: | ||
| - 12.34.56.77 | ||
| - 12.34.56.78 | ||
| - 12.34.56.79 | ||
| nodes: | ||
| - 12.34.56.77 | ||
| - 12.34.56.78 | ||
| - 12.34.56.79 | ||
| ``` | ||
| Then, execute the actual rotation: | ||
|
|
||
| Execute in a pod: | ||
| ```bash | ||
| talosctl rotate-ca -e 12.34.56.77,12.34.56.78,12.34.56.79 \ | ||
| --control-plane-nodes 12.34.56.77,12.34.56.78,12.34.56.79 \ | ||
| --talos=false \ | ||
| --dry-run=false & | ||
| talm -f nodes/node.yaml rotate-ca --talos=true --kubernetes=false --dry-run=false | ||
| ``` | ||
|
|
||
| Get a new kubeconfig: | ||
| ```bash | ||
| talm kubeconfig -f nodes/srv1.yaml | ||
| ``` | ||
| After the rotation is complete, download the new `talosconfig` from the secrets. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| ### Rotate CA for Talos API | ||
| ### Rotate CA for the Management Kubernetes Cluster | ||
|
|
||
| To rotate the Kubernetes CA for the management cluster, use the following command: | ||
|
|
||
| First, run in dry-run mode to preview the changes: | ||
|
|
||
| See: https://www.talos.dev/v1.9/advanced/ca-rotation/#talos-api | ||
| ```bash | ||
| talm -f nodes/node.yaml rotate-ca --talos=false --kubernetes=true | ||
| ``` | ||
|
|
||
| All commands are like for the management k8s cluster, but with `talosctl` command: | ||
| Then, execute the actual rotation: | ||
|
|
||
| ```bash | ||
| talosctl rotate-ca -e 12.34.56.77,12.34.56.78,12.34.56.79 \ | ||
| --control-plane-nodes 12.34.56.77,12.34.56.78,12.34.56.79 \ | ||
| --kubernetes=false \ | ||
| --dry-run=false & | ||
| talm -f nodes/node.yaml rotate-ca --talos=false --kubernetes=true --dry-run=false | ||
| ``` | ||
|
|
||
| ### Rotate CA for a Tenant Kubernetes Cluster | ||
|
|
||
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.
The filename
nodes/node.yamlseems inconsistent with thetalmsetup guide (talm.md), which uses node-specific files likenodes/node1.yaml. To improve clarity and consistency across the documentation, consider using a more specific placeholder likenodes/node1.yamlornodes/<your-node-file>.yaml. This comment applies to alltalmcommands in this file.