Skip to content

Commit d051e9a

Browse files
dereknolabrandond
andauthored
Update manual upgrade page with better order of operations (#251)
* Update manual upgrade page with better order of operations * Codespell Co-authored-by: Brad Davidson <[email protected]> Signed-off-by: Derek Nola <[email protected]>
1 parent be3859e commit d051e9a

File tree

6 files changed

+242
-203
lines changed

6 files changed

+242
-203
lines changed

.codespellrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[codespell]
22
skip = .git,./src,./node_modules,*.js,*.json,./build,./.github,yarn.lock
33
check-filenames = true
4-
ignore-words-list = aks,ec2,eks,gce,gcp,ro,shouldnot,pullrequest
4+
ignore-words-list = aks,ec2,eks,gce,gcp,ro,shouldnot,pullrequest,readd

docs/release-notes/v1.26.X.md

+70-70
Large diffs are not rendered by default.

docs/release-notes/v1.27.X.md

+55-55
Large diffs are not rendered by default.

docs/release-notes/v1.28.X.md

+45-45
Large diffs are not rendered by default.

docs/upgrades/killall.md

+57
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,63 @@ weight: 4
66

77
To allow high availability during upgrades, the K3s containers continue running when the K3s service is stopped.
88

9+
10+
## K3s Service
11+
12+
Stopping and restarting K3s is supported by the installation script for systemd and OpenRC.
13+
14+
<Tabs>
15+
<TabItem value="systemd">
16+
17+
To stop servers:
18+
```sh
19+
sudo systemctl stop k3s
20+
```
21+
22+
To restart servers:
23+
```sh
24+
sudo systemctl start k3s
25+
```
26+
27+
To stop agents:
28+
```sh
29+
sudo systemctl stop k3s-agent
30+
```
31+
32+
To restart agents:
33+
```sh
34+
sudo systemctl start k3s-agent
35+
```
36+
37+
</TabItem>
38+
<TabItem value="OpenRC">
39+
40+
To stop servers:
41+
```sh
42+
sudo rc-service k3s stop
43+
```
44+
45+
To restart servers:
46+
```sh
47+
sudo rc-service k3s restart
48+
```
49+
50+
To stop agents:
51+
```sh
52+
sudo rc-service k3s-agent stop
53+
```
54+
55+
To restart agents:
56+
```sh
57+
sudo rc-service k3s-agent restart
58+
```
59+
60+
</TabItem>
61+
</Tabs>
62+
63+
64+
## Killall Script
65+
966
To stop all of the K3s containers and reset the containerd state, the `k3s-killall.sh` script can be used.
1067

1168
The killall script cleans up containers, K3s directories, and networking components while also removing the iptables chain with all the associated rules. The cluster data will not be deleted.

docs/upgrades/manual.md

+14-32
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ The contents of the [configuration file](../installation/configuration.md#config
3737
If you want your configuration to be independent from the install script, you should use a configuration file instead of passing environment variables or arguments to the install script.
3838
:::
3939

40+
Running the install script will:
41+
42+
1. Download the new k3s binary
43+
2. Update the systemd unit or openrc init script to reflect the args passed to the install script
44+
3. Restart the k3s service
45+
4046
For example, to upgrade to the current stable release:
4147

4248
```sh
@@ -51,42 +57,18 @@ curl -sfL https://get.k3s.io | INSTALL_K3S_CHANNEL=latest <EXISTING_K3S_ENV> sh
5157
If you want to upgrade to a specific version you can run the following command:
5258

5359
```sh
54-
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=vX.Y.Z-rc1 <EXISTING_K3S_ENV> sh -s - <EXISTING_K3S_ARGS>
60+
curl -sfL https://get.k3s.io | INSTALL_K3S_VERSION=vX.Y.Z+k3s1 <EXISTING_K3S_ENV> sh -s - <EXISTING_K3S_ARGS>
5561
```
5662

57-
### Manually Upgrade K3s Using the Binary
63+
:::tip
64+
If you want to download the new verision of k3s, but not start it, you can use the `INSTALL_K3S_SKIP_START=true` environment variable.
65+
:::
5866

59-
Or to manually upgrade K3s:
67+
### Upgrade K3s Using the Binary
68+
69+
To upgrade K3s manually, you can download the desired version of the K3s binary and replace the existing binary with the new one.
6070

6171
1. Download the desired version of the K3s binary from [releases](https://github.com/k3s-io/k3s/releases)
6272
2. Copy the downloaded binary to `/usr/local/bin/k3s` (or your desired location)
6373
3. Stop the old k3s binary
64-
4. Launch the new k3s binary
65-
66-
### Restarting K3s
67-
68-
Restarting K3s is supported by the installation script for systemd and OpenRC.
69-
70-
**systemd**
71-
72-
To restart servers manually:
73-
```sh
74-
sudo systemctl restart k3s
75-
```
76-
77-
To restart agents manually:
78-
```sh
79-
sudo systemctl restart k3s-agent
80-
```
81-
82-
**OpenRC**
83-
84-
To restart servers manually:
85-
```sh
86-
sudo service k3s restart
87-
```
88-
89-
To restart agents manually:
90-
```sh
91-
sudo service k3s-agent restart
92-
```
74+
4. Launch the new k3s binary

0 commit comments

Comments
 (0)