From 23be71fc0d6b63b27c05d068e4d92e7ffd48538a Mon Sep 17 00:00:00 2001 From: Jennifer Travinski Date: Thu, 11 Nov 2021 17:59:13 -0500 Subject: [PATCH 1/3] Added note for new 2.6 PNI support in Rancher --- .../registered-clusters/_index.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/content/rancher/v2.6/en/cluster-provisioning/registered-clusters/_index.md b/content/rancher/v2.6/en/cluster-provisioning/registered-clusters/_index.md index 7bfa2eff0cb..e8bd195e24e 100644 --- a/content/rancher/v2.6/en/cluster-provisioning/registered-clusters/_index.md +++ b/content/rancher/v2.6/en/cluster-provisioning/registered-clusters/_index.md @@ -38,13 +38,14 @@ If you are registering a K3s cluster, make sure the `cluster.yml` is readable. I 1. On the **Clusters** page, **Import Existing**. 1. Enter a **Cluster Name**. 1. Choose the type of cluster. -4. Use **Member Roles** to configure user authorization for the cluster. Click **Add Member** to add users that can access the cluster. Use the **Role** drop-down to set permissions for each user. -5. If it is a generic custom cluster, use **Agent Environment Variables** under **Cluster Options** to set environment variables for [rancher cluster agent]({{}}/rancher/v2.6/en/cluster-provisioning/rke-clusters/rancher-agents/). The environment variables can be set using key value pairs. If rancher agent requires use of proxy to communicate with Rancher server, `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` environment variables can be set using agent environment variables. -6. Click **Create**. -7. The prerequisite for `cluster-admin` privileges is shown (see **Prerequisites** above), including an example command to fulfil the prerequisite. -8. Copy the `kubectl` command to your clipboard and run it on a node where kubeconfig is configured to point to the cluster you want to import. If you are unsure it is configured correctly, run `kubectl get nodes` to verify before running the command shown in Rancher. -9. If you are using self signed certificates, you will receive the message `certificate signed by unknown authority`. To work around this validation, copy the command starting with `curl` displayed in Rancher to your clipboard. Then run the command on a node where kubeconfig is configured to point to the cluster you want to import. -10. When you finish running the command(s) on your node, click **Done**. + - **Note:** If you are importing a generic Kubernetes cluster in Rancher, you must enable Project Network Isolation to ensure the cluster supports Kubernetes `NetworkPolicy` resources. As of Rancher v2.6.0, users can select the **Project Network Isolation** option under the **Advanced Options** dropdown to do so. +1. Use **Member Roles** to configure user authorization for the cluster. Click **Add Member** to add users that can access the cluster. Use the **Role** drop-down to set permissions for each user. +1. If it is a generic custom cluster, use **Agent Environment Variables** under **Cluster Options** to set environment variables for [rancher cluster agent]({{}}/rancher/v2.6/en/cluster-provisioning/rke-clusters/rancher-agents/). The environment variables can be set using key value pairs. If rancher agent requires use of proxy to communicate with Rancher server, `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` environment variables can be set using agent environment variables. +1. Click **Create**. +1. The prerequisite for `cluster-admin` privileges is shown (see **Prerequisites** above), including an example command to fulfil the prerequisite. +1. Copy the `kubectl` command to your clipboard and run it on a node where kubeconfig is configured to point to the cluster you want to import. If you are unsure it is configured correctly, run `kubectl get nodes` to verify before running the command shown in Rancher. +1. If you are using self signed certificates, you will receive the message `certificate signed by unknown authority`. To work around this validation, copy the command starting with `curl` displayed in Rancher to your clipboard. Then run the command on a node where kubeconfig is configured to point to the cluster you want to import. +1. When you finish running the command(s) on your node, click **Done**. **Result:** From f990f07244be25cdebbd1bb381b65c2fb3534dae Mon Sep 17 00:00:00 2001 From: Jennifer Travinski Date: Mon, 15 Nov 2021 09:14:34 -0500 Subject: [PATCH 2/3] Updated note to be under step 6, generic cluster --- .../v2.6/en/cluster-provisioning/registered-clusters/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/rancher/v2.6/en/cluster-provisioning/registered-clusters/_index.md b/content/rancher/v2.6/en/cluster-provisioning/registered-clusters/_index.md index e8bd195e24e..cf7b3007c96 100644 --- a/content/rancher/v2.6/en/cluster-provisioning/registered-clusters/_index.md +++ b/content/rancher/v2.6/en/cluster-provisioning/registered-clusters/_index.md @@ -38,9 +38,9 @@ If you are registering a K3s cluster, make sure the `cluster.yml` is readable. I 1. On the **Clusters** page, **Import Existing**. 1. Enter a **Cluster Name**. 1. Choose the type of cluster. - - **Note:** If you are importing a generic Kubernetes cluster in Rancher, you must enable Project Network Isolation to ensure the cluster supports Kubernetes `NetworkPolicy` resources. As of Rancher v2.6.0, users can select the **Project Network Isolation** option under the **Advanced Options** dropdown to do so. 1. Use **Member Roles** to configure user authorization for the cluster. Click **Add Member** to add users that can access the cluster. Use the **Role** drop-down to set permissions for each user. 1. If it is a generic custom cluster, use **Agent Environment Variables** under **Cluster Options** to set environment variables for [rancher cluster agent]({{}}/rancher/v2.6/en/cluster-provisioning/rke-clusters/rancher-agents/). The environment variables can be set using key value pairs. If rancher agent requires use of proxy to communicate with Rancher server, `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` environment variables can be set using agent environment variables. + - **Note:** If you are importing a generic Kubernetes cluster in Rancher, you must enable Project Network Isolation to ensure the cluster supports Kubernetes `NetworkPolicy` resources. As of Rancher v2.6.0, users can select the **Project Network Isolation** option under the **Advanced Options** dropdown to do so. 1. Click **Create**. 1. The prerequisite for `cluster-admin` privileges is shown (see **Prerequisites** above), including an example command to fulfil the prerequisite. 1. Copy the `kubectl` command to your clipboard and run it on a node where kubeconfig is configured to point to the cluster you want to import. If you are unsure it is configured correctly, run `kubectl get nodes` to verify before running the command shown in Rancher. From 465953ef58809d627969f504d4f357374fb1ff99 Mon Sep 17 00:00:00 2001 From: Jennifer Travinski Date: Mon, 15 Nov 2021 17:18:41 -0500 Subject: [PATCH 3/3] Added additional step under point 6 for generic cluster --- .../en/cluster-provisioning/registered-clusters/_index.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/content/rancher/v2.6/en/cluster-provisioning/registered-clusters/_index.md b/content/rancher/v2.6/en/cluster-provisioning/registered-clusters/_index.md index cf7b3007c96..6ad807cd9fa 100644 --- a/content/rancher/v2.6/en/cluster-provisioning/registered-clusters/_index.md +++ b/content/rancher/v2.6/en/cluster-provisioning/registered-clusters/_index.md @@ -39,12 +39,13 @@ If you are registering a K3s cluster, make sure the `cluster.yml` is readable. I 1. Enter a **Cluster Name**. 1. Choose the type of cluster. 1. Use **Member Roles** to configure user authorization for the cluster. Click **Add Member** to add users that can access the cluster. Use the **Role** drop-down to set permissions for each user. -1. If it is a generic custom cluster, use **Agent Environment Variables** under **Cluster Options** to set environment variables for [rancher cluster agent]({{}}/rancher/v2.6/en/cluster-provisioning/rke-clusters/rancher-agents/). The environment variables can be set using key value pairs. If rancher agent requires use of proxy to communicate with Rancher server, `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` environment variables can be set using agent environment variables. - - **Note:** If you are importing a generic Kubernetes cluster in Rancher, you must enable Project Network Isolation to ensure the cluster supports Kubernetes `NetworkPolicy` resources. As of Rancher v2.6.0, users can select the **Project Network Isolation** option under the **Advanced Options** dropdown to do so. +1. If you are importing a generic Kubernetes cluster in Rancher, perform the following steps for setup:
+ a. Click **Agent Environment Variables** under **Cluster Options** to set environment variables for [rancher cluster agent]({{}}/rancher/v2.6/en/cluster-provisioning/rke-clusters/rancher-agents/). The environment variables can be set using key value pairs. If rancher agent requires use of proxy to communicate with Rancher server, `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` environment variables can be set using agent environment variables.
+ b. Enable Project Network Isolation to ensure the cluster supports Kubernetes `NetworkPolicy` resources. Users can select the **Project Network Isolation** option under the **Advanced Options** dropdown to do so. 1. Click **Create**. 1. The prerequisite for `cluster-admin` privileges is shown (see **Prerequisites** above), including an example command to fulfil the prerequisite. 1. Copy the `kubectl` command to your clipboard and run it on a node where kubeconfig is configured to point to the cluster you want to import. If you are unsure it is configured correctly, run `kubectl get nodes` to verify before running the command shown in Rancher. -1. If you are using self signed certificates, you will receive the message `certificate signed by unknown authority`. To work around this validation, copy the command starting with `curl` displayed in Rancher to your clipboard. Then run the command on a node where kubeconfig is configured to point to the cluster you want to import. +1. If you are using self-signed certificates, you will receive the message `certificate signed by unknown authority`. To work around this validation, copy the command starting with `curl` displayed in Rancher to your clipboard. Then run the command on a node where kubeconfig is configured to point to the cluster you want to import. 1. When you finish running the command(s) on your node, click **Done**.