Skip to content

Commit 57a2e45

Browse files
committed
Merge branch 'master' into rke2-prov-vsphere
2 parents 0ef065f + f1b6a38 commit 57a2e45

File tree

70 files changed

+4940
-475
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+4940
-475
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ package-lock.json
1111
/scripts/converters/results_to_markdown/.terraform
1212
/scripts/converters/results_to_markdown/terraform.tfstate*
1313
/scripts/converters/results_to_markdown/*.tfvars
14+
15+
.idea/

config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,4 +209,4 @@ pre = "<i class='material-icons'>keyboard_arrow_down</i>"
209209
[[menu.main]]
210210
name = "Partners"
211211
url = "https://rancher.com/partners/"
212-
parent = "about"
212+
parent = "about"

content/k3s/latest/en/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ K3s is a fully compliant Kubernetes distribution with the following enhancements
2626
* Secure by default with reasonable defaults for lightweight environments.
2727
* Simple but powerful "batteries-included" features have been added, such as: a local storage provider, a service load balancer, a Helm controller, and the Traefik ingress controller.
2828
* Operation of all Kubernetes control plane components is encapsulated in a single binary and process. This allows K3s to automate and manage complex cluster operations like distributing certificates.
29-
* External dependencies have been minimized (just a modern kernel and cgroup mounts needed). K3s packages required dependencies, including:
29+
* External dependencies have been minimized (just a modern kernel and cgroup mounts needed). K3s packages the required dependencies, including:
3030
* containerd
3131
* Flannel
3232
* CoreDNS
@@ -38,4 +38,4 @@ K3s is a fully compliant Kubernetes distribution with the following enhancements
3838

3939
# What's with the name?
4040

41-
We wanted an installation of Kubernetes that was half the size in terms of memory footprint. Kubernetes is a 10-letter word stylized as K8s. So something half as big as Kubernetes would be a 5-letter word stylized as K3s. There is no long form of K3s and no official pronunciation.
41+
We wanted an installation of Kubernetes that was half the size in terms of memory footprint. Kubernetes is a 10-letter word stylized as K8s. So something half as big as Kubernetes would be a 5-letter word stylized as K3s. There is no long form of K3s and no official pronunciation.

content/k3s/latest/en/advanced/_index.md

Lines changed: 37 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ This section contains advanced information describing the different ways you can
1717
- [Node labels and taints](#node-labels-and-taints)
1818
- [Starting the server with the installation script](#starting-the-server-with-the-installation-script)
1919
- [Additional preparation for Alpine Linux setup](#additional-preparation-for-alpine-linux-setup)
20+
- [Additional preparation for (Red Hat/CentOS) Enterprise Linux](#additional-preparation-for-red-hat/centos-enterprise-linux)
21+
- [Additional preparation for Raspberry Pi OS Setup](#additional-preparation-for-raspberry-pi-os-setup)
22+
- [Enabling vxlan on Ubuntu 21.10+ on Raspberry Pi](#enabling-vxlan-on-ubuntu-21.10+-on-raspberry-pi)
2023
- [Running K3d (K3s in Docker) and docker-compose](#running-k3d-k3s-in-docker-and-docker-compose)
21-
- [Enabling legacy iptables on Raspbian Buster](#enabling-legacy-iptables-on-raspbian-buster)
22-
- [Enabling cgroups for Raspbian Buster](#enabling-cgroups-for-raspbian-buster)
2324
- [SELinux Support](#selinux-support)
24-
- [Additional preparation for (Red Hat/CentOS) Enterprise Linux](#additional-preparation-for-red-hat-centos-enterprise-linux)
2525
- [Enabling Lazy Pulling of eStargz (Experimental)](#enabling-lazy-pulling-of-estargz-experimental)
2626
- [Additional Logging Sources](#additional-logging-sources)
2727
- [Server and agent tokens](#server-and-agent-tokens)
@@ -143,7 +143,7 @@ K3s will generate config.toml for containerd in `/var/lib/rancher/k3s/agent/etc/
143143
144144
For advanced customization for this file you can create another file called `config.toml.tmpl` in the same directory and it will be used instead.
145145
146-
The `config.toml.tmpl` will be treated as a Go template file, and the `config.Node` structure is being passed to the template. [This template](https://github.com/rancher/k3s/blob/master/pkg/agent/templates/templates.go#L16-L32) example on how to use the structure to customize the configuration file.
146+
The `config.toml.tmpl` will be treated as a Go template file, and the `config.Node` structure is being passed to the template. See [this folder](https://github.com/k3s-io/k3s/blob/master/pkg/agent/templates) for Linux and Windows examples on how to use the structure to customize the configuration file.
147147
148148
149149
# Running K3s with Rootless mode (Experimental)
@@ -256,6 +256,39 @@ Then update the config and reboot:
256256
update-extlinux
257257
reboot
258258
```
259+
# Additional preparation for (Red Hat/CentOS) Enterprise Linux
260+
261+
It is recommended to turn off firewalld:
262+
```
263+
systemctl disable firewalld --now
264+
```
265+
266+
If enabled, it is required to disable nm-cloud-setup and reboot the node:
267+
```
268+
systemctl disable nm-cloud-setup.service nm-cloud-setup.timer
269+
reboot
270+
```
271+
272+
# Additional preparation for Raspberry Pi OS Setup
273+
## Enabling legacy iptables on Raspberry Pi OS
274+
Raspberry Pi OS (formerly Raspbian) defaults to using `nftables` instead of `iptables`. **K3S** networking features require `iptables` and do not work with `nftables`. Follow the steps below to switch configure **Buster** to use `legacy iptables`:
275+
```
276+
sudo iptables -F
277+
sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
278+
sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
279+
sudo reboot
280+
```
281+
282+
## Enabling cgroups for Raspberry Pi OS
283+
284+
Standard Raspberry Pi OS installations do not start with `cgroups` enabled. **K3S** needs `cgroups` to start the systemd service. `cgroups`can be enabled by appending `cgroup_memory=1 cgroup_enable=memory` to `/boot/cmdline.txt`.
285+
286+
# Enabling vxlan on Ubuntu 21.10+ on Raspberry Pi
287+
288+
Starting with Ubuntu 21.10, vxlan support on Raspberry Pi has been moved into a seperate kernel module.
289+
```
290+
sudo apt install linux-modules-extra-raspi
291+
```
259292

260293
# Running K3d (K3s in Docker) and docker-compose
261294

@@ -293,20 +326,6 @@ Alternatively the `docker run` command can also be used:
293326
--privileged rancher/k3s:vX.Y.Z
294327

295328

296-
# Enabling legacy iptables on Raspbian Buster
297-
298-
Raspbian Buster defaults to using `nftables` instead of `iptables`. **K3S** networking features require `iptables` and do not work with `nftables`. Follow the steps below to switch configure **Buster** to use `legacy iptables`:
299-
```
300-
sudo iptables -F
301-
sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
302-
sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
303-
sudo reboot
304-
```
305-
306-
# Enabling cgroups for Raspbian Buster
307-
308-
Standard Raspbian Buster installations do not start with `cgroups` enabled. **K3S** needs `cgroups` to start the systemd service. `cgroups`can be enabled by appending `cgroup_memory=1 cgroup_enable=memory` to `/boot/cmdline.txt`.
309-
310329
### example of /boot/cmdline.txt
311330
```
312331
console=serial0,115200 console=tty1 root=PARTUUID=58b06195-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait cgroup_memory=1 cgroup_enable=memory
@@ -365,19 +384,6 @@ Using a custom `--data-dir` under SELinux is not supported. To customize it, you
365384
{{%/tab%}}
366385
{{% /tabs %}}
367386

368-
# Additional preparation for (Red Hat/CentOS) Enterprise Linux
369-
370-
It is recommended to turn off firewalld:
371-
```
372-
systemctl disable firewalld --now
373-
```
374-
375-
If enabled, it is required to disable nm-cloud-setup and reboot the node:
376-
```
377-
systemctl disable nm-cloud-setup.service nm-cloud-setup.timer
378-
reboot
379-
```
380-
381387
# Enabling Lazy Pulling of eStargz (Experimental)
382388

383389
### What's lazy pulling and eStargz?

content/k3s/latest/en/installation/install-options/how-to-flags/_index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,4 @@ token: "secret"
4646
node-ip: 10.0.10.22,2a05:d012:c6f:4655:d73c:c825:a184:1b75
4747
cluster-cidr: 10.42.0.0/16,2001:cafe:42:0::/56
4848
service-cidr: 10.43.0.0/16,2001:cafe:42:1::/112
49-
disable-network-policy: true
5049
```

content/k3s/latest/en/installation/installation-requirements/_index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ K3s performance depends on the performance of the database. To ensure optimal sp
4444

4545
The K3s server needs port 6443 to be accessible by all nodes.
4646

47-
The nodes need to be able to reach other nodes over UDP port 8472 when Flannel VXLAN is used. The node should not listen on any other port. K3s uses reverse tunneling such that the nodes make outbound connections to the server and all kubelet traffic runs through that tunnel. However, if you do not use Flannel and provide your own custom CNI, then port 8472 is not needed by K3s.
47+
The nodes need to be able to reach other nodes over UDP port 8472 when Flannel VXLAN is used or over UDP ports 51820 and 51821 (when using IPv6) when Flannel Wireguard backend is used. The node should not listen on any other port. K3s uses reverse tunneling such that the nodes make outbound connections to the server and all kubelet traffic runs through that tunnel. However, if you do not use Flannel and provide your own custom CNI, then the ports needed by Flannel are not needed by K3s.
4848

4949
If you wish to utilize the metrics server, you will need to open port 10250 on each node.
5050

@@ -59,6 +59,8 @@ If you plan on achieving high availability with embedded etcd, server nodes must
5959
|-----|-----|----------------|---|
6060
| TCP | 6443 | K3s agent nodes | Kubernetes API Server
6161
| UDP | 8472 | K3s server and agent nodes | Required only for Flannel VXLAN
62+
| UDP | 51820 | K3s server and agent nodes | Required only for Flannel Wireguard backend
63+
| UDP | 51821 | K3s server and agent nodes | Required only for Flannel Wireguard backend with IPv6
6264
| TCP | 10250 | K3s server and agent nodes | Kubelet metrics
6365
| TCP | 2379-2380 | K3s server nodes | Required only for HA with embedded etcd
6466

content/k3s/latest/en/installation/network-options/_index.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ If you wish to use WireGuard as your flannel backend it may require additional k
1919
<span style="white-space: nowrap">`--flannel-backend=ipsec`</span> | Uses the IPSEC backend which encrypts network traffic. |
2020
<span style="white-space: nowrap">`--flannel-backend=host-gw`</span> | Uses the host-gw backend. |
2121
<span style="white-space: nowrap">`--flannel-backend=wireguard`</span> | Uses the WireGuard backend which encrypts network traffic. May require additional kernel modules and configuration. |
22+
<span style="white-space: nowrap">`--flannel-ipv6-masq`</span> | Apply masquerading rules to IPv6 traffic (default for IPv4). Only applies on dual-stack or IPv6-only clusters |
2223

2324
### Custom CNI
2425

@@ -74,15 +75,22 @@ You should see that IP forwarding is set to true.
7475

7576
Dual-stack networking must be configured when the cluster is first created. It cannot be enabled on an existing single-stack cluster.
7677

77-
To enable dual-stack in k3s, you must provide valid dual-stack `cluster-cidr` and `service-cidr`, and set `disable-network-policy` on all server nodes. Both servers and agents must provide valid dual-stack `node-ip` settings. Node address auto-detection and network policy enforcement are not supported on dual-stack clusters when using the default flannel CNI. Besides, only vxlan backend is supported at the moment. This is an example of a valid configuration:
78+
Dual-stack is supported on k3s v1.21 or above.
79+
80+
To enable dual-stack in K3s, you must provide valid dual-stack `cluster-cidr` and `service-cidr` on all server nodes. Both servers and agents must provide valid dual-stack `node-ip` settings. Node address auto-detection is not supported on dual-stack clusters, because kubelet fetches only the first IP address that it finds. Additionally, only vxlan backend is supported currently. This is an example of a valid configuration:
7881

7982
```
80-
node-ip: 10.0.10.7,2a05:d012:c6f:4611:5c2:5602:eed2:898c
81-
cluster-cidr: 10.42.0.0/16,2001:cafe:42:0::/56
82-
service-cidr: 10.43.0.0/16,2001:cafe:42:1::/112
83-
disable-network-policy: true
83+
k3s server --node-ip 10.0.10.7,2a05:d012:c6f:4611:5c2:5602:eed2:898c --cluster-cidr 10.42.0.0/16,2001:cafe:42:0::/56 --service-cidr 10.43.0.0/16,2001:cafe:42:1::/112
8484
```
8585

8686
Note that you can choose whatever `cluster-cidr` and `service-cidr` value, however the `node-ip` values must correspond to the ip addresses of your main interface. Remember to allow ipv6 traffic if you are deploying in a public cloud.
8787

8888
If you are using a custom cni plugin, i.e. a cni plugin different from flannel, the previous configuration might not be enough to enable dual-stack in the cni plugin. Please check how to enable dual-stack in its documentation and verify if network policies can be enabled.
89+
90+
### IPv6 only installation
91+
92+
IPv6 only setup is supported on k3s v1.22 or above. Note that network policy enforcement is not supported on IPv6-only clusters when using the default flannel CNI. This is an example of a valid configuration:
93+
94+
```
95+
k3s server --disable-network-policy
96+
```

content/k3s/latest/en/installation/private-registry/_index.md

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,43 @@ mirrors:
3232

3333
Each mirror must have a name and set of endpoints. When pulling an image from a registry, containerd will try these endpoint URLs one by one, and use the first working one.
3434

35+
#### Rewrites
36+
37+
Each mirror can have a set of rewrites. Rewrites can change the tag of an image based on a regular expression. This is useful if the organization/project structure in the mirror registry is different to the upstream one.
38+
39+
For example, the following configuration would transparently pull the image `docker.io/rancher/coredns-coredns:1.6.3` from `registry.example.com:5000/mirrorproject/rancher-images/coredns-coredns:1.6.3`:
40+
41+
```
42+
mirrors:
43+
docker.io:
44+
endpoint:
45+
- "https://registry.example.com:5000"
46+
rewrite:
47+
"^rancher/(.*)": "mirrorproject/rancher-images/$1"
48+
```
49+
50+
The image will still be stored under the original name so that a `crictl image ls` will show `docker.io/rancher/coredns-coredns:1.6.3` as available on the node, even though the image was pulled from the mirrored registry with a different name.
51+
3552
### Configs
3653

37-
The configs section defines the TLS and credential configuration for each mirror. For each mirror you can define `auth` and/or `tls`. The TLS part consists of:
54+
The `configs` section defines the TLS and credential configuration for each mirror. For each mirror you can define `auth` and/or `tls`.
55+
56+
The `tls` part consists of:
3857

39-
Directive | Description
40-
----------|------------
41-
`cert_file` | The client certificate path that will be used to authenticate with the registry
42-
`key_file` | The client key path that will be used to authenticate with the registry
43-
`ca_file` | Defines the CA certificate path to be used to verify the registry's server cert file
44-
`insecure_skip_verify` | Boolean that defines if TLS verification should be skipped for the registry
58+
| Directive | Description |
59+
|------------------------|--------------------------------------------------------------------------------------|
60+
| `cert_file` | The client certificate path that will be used to authenticate with the registry |
61+
| `key_file` | The client key path that will be used to authenticate with the registry |
62+
| `ca_file` | Defines the CA certificate path to be used to verify the registry's server cert file |
63+
| `insecure_skip_verify` | Boolean that defines if TLS verification should be skipped for the registry |
4564

46-
The credentials consist of either username/password or authentication token:
65+
The `auth` part consists of either username/password or authentication token:
4766

48-
- username: user name of the private registry basic auth
49-
- password: user password of the private registry basic auth
50-
- auth: authentication token of the private registry basic auth
67+
| Directive | Description |
68+
|------------|---------------------------------------------------------|
69+
| `username` | user name of the private registry basic auth |
70+
| `password` | user password of the private registry basic auth |
71+
| `auth` | authentication token of the private registry basic auth |
5172

5273
Below are basic examples of using private registries in different modes:
5374

content/rancher/v2.0-v2.4/en/installation/resources/advanced/firewall/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Opening Ports with firewalld
33
weight: 1
44
---
55

6-
> We recommend disabling firewalld. For Kubernetes 1.19, firewalld must be turned off.
6+
> We recommend disabling firewalld. For Kubernetes 1.19.x and higher, firewalld must be turned off.
77
88
Some distributions of Linux [derived from RHEL,](https://en.wikipedia.org/wiki/Red_Hat_Enterprise_Linux#Rebuilds) including Oracle Linux, may have default firewall rules that block communication with Helm.
99

content/rancher/v2.5/en/cluster-admin/certificate-rotation/_index.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,22 @@ Certificates can be rotated for the following services:
1919
- kube-scheduler
2020
- kube-controller-manager
2121

22+
23+
### Certificate Rotation
24+
25+
Rancher launched Kubernetes clusters have the ability to rotate the auto-generated certificates through the UI.
26+
27+
1. In the **Global** view, navigate to the cluster that you want to rotate certificates.
28+
29+
2. Select **⋮ > Rotate Certificates**.
30+
31+
3. Select which certificates that you want to rotate.
32+
33+
* Rotate all Service certificates (keep the same CA)
34+
* Rotate an individual service and choose one of the services from the drop-down menu
35+
36+
4. Click **Save**.
37+
38+
**Results:** The selected certificates will be rotated and the related services will be restarted to start using the new certificate.
39+
40+
> **Note:** Even though the RKE CLI can use custom certificates for the Kubernetes cluster components, Rancher currently doesn't allow the ability to upload these in Rancher launched Kubernetes clusters.

content/rancher/v2.5/en/cluster-provisioning/rke-clusters/cloud-providers/_index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ aliases:
66
- /rancher/v2.5/en/cluster-provisioning/rke-clusters/options/cloud-providers
77
- /rancher/v2.x/en/cluster-provisioning/rke-clusters/cloud-providers/
88
---
9-
A _cloud provider_ is a module in Kubernetes that provides an interface for managing nodes, load balancers, and networking routes. For more information, refer to the [official Kubernetes documentation on cloud providers.](https://kubernetes.io/docs/concepts/cluster-administration/cloud-providers/)
9+
A _cloud provider_ is a module in Kubernetes that provides an interface for managing nodes, load balancers, and networking routes.
1010

1111
When a cloud provider is set up in Rancher, the Rancher server can automatically provision new nodes, load balancers or persistent storage devices when launching Kubernetes definitions, if the cloud provider you're using supports such automation.
1212

@@ -39,9 +39,9 @@ For details on enabling the vSphere cloud provider, refer to [this page.](./vsph
3939

4040
### Setting up a Custom Cloud Provider
4141

42-
The `Custom` cloud provider is available if you want to configure any [Kubernetes cloud provider](https://kubernetes.io/docs/concepts/cluster-administration/cloud-providers/).
42+
The `Custom` cloud provider is available if you want to configure any Kubernetes cloud provider.
4343

44-
For the custom cloud provider option, you can refer to the [RKE docs]({{<baseurl>}}/rke/latest/en/config-options/cloud-providers/) on how to edit the yaml file for your specific cloud provider. There are specific cloud providers that have more detailed configuration :
44+
For the custom cloud provider option, you can refer to the [RKE docs]({{<baseurl>}}/rke/latest/en/config-options/cloud-providers/) on how to edit the yaml file for your specific cloud provider. There are specific cloud providers that have more detailed configuration:
4545

4646
* [vSphere]({{<baseurl>}}/rke/latest/en/config-options/cloud-providers/vsphere/)
4747
* [OpenStack]({{<baseurl>}}/rke/latest/en/config-options/cloud-providers/openstack/)

content/rancher/v2.5/en/cluster-provisioning/rke-clusters/cloud-providers/vsphere/out-of-tree/_index.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ This page covers how to install the Cloud Provider Interface (CPI) and Cloud Sto
1313

1414
# Prerequisites
1515

16-
The vSphere version must be 7.0u1 or higher.
16+
The vSphere versions supported:
17+
18+
* 6.7u3
19+
* 7.0u1 or higher.
1720

1821
The Kubernetes version must be 1.19 or higher.
1922

0 commit comments

Comments
 (0)