Apply suggestions from code review

Co-authored-by: Billy Tat <btat@suse.com>
This commit is contained in:
Marty Hernandez Avedon
2023-03-21 14:28:09 -04:00
committed by GitHub
co-authored by Billy Tat
parent 2e13013f6b
commit 770d58ffb9
@@ -4,19 +4,20 @@ title: Upgrade a Hardened Custom/Imported Cluster to Kubernetes v1.25
Kubernetes v1.25 changes how clusters describe and implement security policies. From this version forward, [Pod Security Policies (PSPs)](https://kubernetes.io/docs/concepts/security/pod-security-policy/) are no longer available. Kubernetes v1.25 replaces them with new security objects: [Pod Security Standards (PSS)](https://kubernetes.io/docs/concepts/security/pod-security-standards/), and [Pod Security Admissions (PSAs)](https://kubernetes.io/docs/concepts/security/pod-security-admission/).
If you have custom or imported hardened clusters, you must make special preparations to ensure that the upgrade from an earlier version of Kubernetes to ≥v1.25 goes smoothly.
If you have custom or imported hardened clusters, you must make special preparations to ensure that the upgrade from an earlier version of Kubernetes to v1.25 or later goes smoothly.
## Upgrading Imported Hardened Clusters to Kubernetes ≥v1.25
<Tabs>
<Tabs groupId="k8s-distro">
<TabItem value="RKE2" default>
1. Save [`rancher-psact.yaml`](./rancher-psact.yaml) in `/etc/rancher/rke2` on each node in the cluster.
1. Edit the RKE2 configuration file:
1. Update the `profile` field to `cis-1.23`.
1. Specify the path for the configuration file that you just added: `pod-security-admission-config-file: /etc/rancher/rke2/rancher-psact.yaml`.
</TabItem>
<TabItem value="K3s">
Follow the [official K3s instructions](https://docs.k3s.io/known-issues#:~:text=Upgrading%20Hardened%20Clusters%20from%20v1.24.x%20to%20v1.25.x), but use a [custom](./rancher-psact.yaml) Rancher PSA configuration template, instead of the configuration provided on the official K3s site.
Follow the official K3s instructions on [Upgrading Hardened Clusters from v1.24.x to v1.25.x](https://docs.k3s.io/known-issues#:~:text=Upgrading%20Hardened%20Clusters%20from%20v1.24.x%20to%20v1.25.x), but use a [custom](./rancher-psact.yaml) Rancher PSA configuration template, instead of the configuration provided on the official K3s site.
</TabItem>
</Tabs>
@@ -27,9 +28,9 @@ After you perform these steps, you can upgrade the cluster's Kubernetes version
1. Select **Edit Config**.
1. In the **Kubernetes Version** dropdown menu, select the version that you would like to use.
## Upgrading Custom Hardened Clusters to Kubernetes ≥v1.25
## Upgrading Custom Hardened Clusters to Kubernetes v1.25 or Later
<Tabs>
<Tabs groupId="operating-systems">
<TabItem value="RKE2" default>
1. In the upper left corner, click **☰ > Cluster Management**.
1. Find the cluster you want to update in the **Clusters** table, and click the **⋮**.
@@ -44,6 +45,7 @@ Now, upgrade the cluster's Kubernetes version through the Rancher UI:
1. Find the cluster you want to update in the **Clusters** table, and click the **⋮**.
1. Select **Edit Config**.
1. In the **Kubernetes Version** dropdown menu, select the version that you would like to use.
</TabItem>
<TabItem value="K3s">
1. In the upper left corner, click **☰ > Cluster Management**.
@@ -53,5 +55,6 @@ Now, upgrade the cluster's Kubernetes version through the Rancher UI:
1. Add this line to the `spec` field: `defaultPodSecurityAdmissionConfigurationTemplateName: rancher-restricted`
1. Update `kubernetesVersion` to your chosen version (v1.25 or later).
1. Click **Save**.
</TabItem>
</Tabs>