From ecd9f73932bd050bc713f4e20f53c4e40738691e Mon Sep 17 00:00:00 2001 From: Jennifer Travinski Date: Tue, 16 Nov 2021 10:10:32 -0500 Subject: [PATCH 1/9] Created new section for project-scoped secrets in UI --- .../v2.6/en/k8s-in-rancher/secrets/_index.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/content/rancher/v2.6/en/k8s-in-rancher/secrets/_index.md b/content/rancher/v2.6/en/k8s-in-rancher/secrets/_index.md index 1b0a7c447ec..ff7b9a391df 100644 --- a/content/rancher/v2.6/en/k8s-in-rancher/secrets/_index.md +++ b/content/rancher/v2.6/en/k8s-in-rancher/secrets/_index.md @@ -11,7 +11,7 @@ When configuring a workload, you'll be able to choose which secrets to include. Mounted secrets will be updated automatically unless they are mounted as subpath volumes. For details on how updated secrets are propagated, refer to the [Kubernetes documentation.](https://kubernetes.io/docs/concepts/configuration/secret/#mounted-secrets-are-updated-automatically) -# Creating Secrets +# Creating Secrets in Namespaces 1. In the upper left corner, click **☰ > Cluster Management**. 1. Go to the cluster where you want to add a secret and click **Explore**. @@ -35,6 +35,23 @@ Mounted secrets will be updated automatically unless they are mounted as subpath Mounted secrets will be updated automatically unless they are mounted as subpath volumes. For details on how updated secrets are propagated, refer to the [Kubernetes documentation.](https://kubernetes.io/docs/concepts/configuration/secret/#mounted-secrets-are-updated-automatically) + +# Creating Secrets in Projects + +Prior to v2.6, secrets were required to be in a project scope. Projects are no longer required, and you may use the namespace scope instead. As a result, the Rancher UI was updated to reflect this new functionality. However, you may still create project-scoped secrets if desired. Note that you have to first enable the `legacy` feature flag and look at a single project to do so. Use the following steps to set up your project-level secret: + +1. In the upper left corner, click **☰ > Global Settings** in the dropdown. +1. Click **Feature Flags**. +1. Go to the `legacy` feature flag and click **Activate**. +1. In the upper left corner, click **☰ > Cluster Management** in the dropdown. +1. Go to the cluster that you created and click **Explore.** +1. Click **Legacy > Projects**. +1. In the top navigation bar, filter to see only one project. +1. In the left navigation bar, click **Secrets**. +1. Click **Add Secret**. + +**Result:** Your secret is added to the individual project you chose. You can view the secret in the Rancher UI by clicking either **Storage > Secrets** or **More Resources > Core > Secrets**. + # What's Next? Now that you have a secret added to a namespace, you can add it to a workload that you deploy. From 5263e25c98f761e1db9e3ec79987b5ee8064ba05 Mon Sep 17 00:00:00 2001 From: Jennifer Travinski Date: Tue, 16 Nov 2021 11:22:05 -0500 Subject: [PATCH 2/9] Created new section for project-scoped registries in UI --- .../en/k8s-in-rancher/registries/_index.md | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/content/rancher/v2.6/en/k8s-in-rancher/registries/_index.md b/content/rancher/v2.6/en/k8s-in-rancher/registries/_index.md index c5494e3d61e..12c11dad97d 100644 --- a/content/rancher/v2.6/en/k8s-in-rancher/registries/_index.md +++ b/content/rancher/v2.6/en/k8s-in-rancher/registries/_index.md @@ -14,13 +14,13 @@ Deployments use the Kubernetes registry secret to authenticate with a private Do Currently, deployments pull the private registry credentials automatically only if the workload is created in the Rancher UI and not when it is created via kubectl. -# Creating a Registry +# Creating a Registry in Namespaces >**Prerequisites:** You must have a [private registry](https://docs.docker.com/registry/deploying/) available to use. 1. In the upper left corner, click **☰ > Cluster Management**. 1. Go to the cluster where you want to add a registry and click **Explore**. -1. In the left navigation lick **More Resources > Core > Secrets**. +1. In the left navigation, click either **Storage > Secrets** or **More Resources > Core > Secrets**. 1. Click **Create**. 1. Click **Registry**. 1. Enter a **Name** for the registry. @@ -39,6 +39,23 @@ Currently, deployments pull the private registry credentials automatically only - You can view the secret in the Rancher UI from the **Resources > Registries** view. - Any workload that you create in the Rancher UI will have the credentials to access the registry if the workload is within the registry's scope. +# Creating a Registry in Projects + +>**Prerequisites:** You must have a [private registry](https://docs.docker.com/registry/deploying/) available to use. + +Prior to v2.6, secrets were required to be in a project scope. Projects are no longer required, and you may use the namespace scope instead. As a result, the Rancher UI was updated to reflect this new functionality. However, you may still create a project-scoped registry if desired. Use the following steps to do so: + +1. In the upper left corner, click **☰ > Global Settings** in the dropdown. +1. Click **Feature Flags**. +1. Go to the `legacy` feature flag and click **Activate**. +1. Continue following [steps 1 - 9]({{}}/rancher/v2.6/en/k8s-in-rancher/registries/#creating-a-registry-in-namespaces) above to create and save your project-level registry. Note that in Step 7 above, you will select the project rather than the namespace you want to use. + +**Result:** + +- Your secret is added to the project you chose. +- You can view the secret in the Rancher UI from the **Resources > Registries** view. +- Any workload that you create in the Rancher UI will have the credentials to access the registry if the workload is within the registry's scope. + # Using a Private Registry You can deploy a workload with an image from a private registry through the Rancher UI, or with `kubectl`. From fbba23fb61fe95519a549c6528e37bd51e5d3242 Mon Sep 17 00:00:00 2001 From: Jennifer Travinski Date: Tue, 16 Nov 2021 11:35:40 -0500 Subject: [PATCH 3/9] Updated link --- content/rancher/v2.6/en/k8s-in-rancher/registries/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/rancher/v2.6/en/k8s-in-rancher/registries/_index.md b/content/rancher/v2.6/en/k8s-in-rancher/registries/_index.md index 12c11dad97d..c7ff6f37786 100644 --- a/content/rancher/v2.6/en/k8s-in-rancher/registries/_index.md +++ b/content/rancher/v2.6/en/k8s-in-rancher/registries/_index.md @@ -48,7 +48,7 @@ Prior to v2.6, secrets were required to be in a project scope. Projects are no l 1. In the upper left corner, click **☰ > Global Settings** in the dropdown. 1. Click **Feature Flags**. 1. Go to the `legacy` feature flag and click **Activate**. -1. Continue following [steps 1 - 9]({{}}/rancher/v2.6/en/k8s-in-rancher/registries/#creating-a-registry-in-namespaces) above to create and save your project-level registry. Note that in Step 7 above, you will select the project rather than the namespace you want to use. +1. Continue following [steps 1 - 9](#creating-a-registry-in-namespaces) above to create and save your project-level registry. Note that in Step 7 above, you will select the project rather than the namespace you want to use. **Result:** From b8edb209dfe01bd9367396f5b1b0b31e604ced46 Mon Sep 17 00:00:00 2001 From: Jennifer Travinski Date: Tue, 16 Nov 2021 11:36:53 -0500 Subject: [PATCH 4/9] Added explanation for UI change for project-level secrets --- .../v2.6/en/cluster-admin/projects-and-namespaces/_index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/rancher/v2.6/en/cluster-admin/projects-and-namespaces/_index.md b/content/rancher/v2.6/en/cluster-admin/projects-and-namespaces/_index.md index 71820214033..cd309190b93 100644 --- a/content/rancher/v2.6/en/cluster-admin/projects-and-namespaces/_index.md +++ b/content/rancher/v2.6/en/cluster-admin/projects-and-namespaces/_index.md @@ -8,6 +8,8 @@ A namespace is a Kubernetes concept that allows a virtual cluster within a clust A project is a group of namespaces, and it is a concept introduced by Rancher. Projects allow you to manage multiple namespaces as a group and perform Kubernetes operations in them. You can use projects to support multi-tenancy, so that a team can access a project within a cluster without having access to other projects in the same cluster. +>**Note:** As of Rancher v2.6, projects are de-emphasized on the UI because you don't need them anymore to create secrets exclusively. However, it's still possible to create [secrets in projects]({{}}/rancher/v2.6/en/k8s-in-rancher/secrets/#creating-secrets-in-projects) if desired. + This section describes how projects and namespaces work with Rancher. It covers the following topics: - [About namespaces](#about-namespaces) From ca6010df11029262fa47428e20db0957a5fb5a50 Mon Sep 17 00:00:00 2001 From: Jennifer Travinski Date: Tue, 16 Nov 2021 15:41:37 -0500 Subject: [PATCH 5/9] Updated directions for registries --- .../en/k8s-in-rancher/registries/_index.md | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/content/rancher/v2.6/en/k8s-in-rancher/registries/_index.md b/content/rancher/v2.6/en/k8s-in-rancher/registries/_index.md index c7ff6f37786..ae3a0fd7b35 100644 --- a/content/rancher/v2.6/en/k8s-in-rancher/registries/_index.md +++ b/content/rancher/v2.6/en/k8s-in-rancher/registries/_index.md @@ -28,15 +28,13 @@ Currently, deployments pull the private registry credentials automatically only >**Note:** Kubernetes classifies secrets, certificates, and registries all as [secrets](https://kubernetes.io/docs/concepts/configuration/secret/), and no two secrets in a project or namespace can have duplicate names. Therefore, to prevent conflicts, your registry must have a unique name among all secrets within your workspace. 1. Select a namespace for the registry. - 1. Select the website that hosts your private registry. Then enter credentials that authenticate with the registry. For example, if you use DockerHub, provide your DockerHub username and password. - 1. Click **Save**. **Result:** - Your secret is added to the namespace you chose. -- You can view the secret in the Rancher UI from the **Resources > Registries** view. +- You can view the secret in the Rancher UI by clicking either **Storage > Secrets** or **More Resources > Core > Secrets**. - Any workload that you create in the Rancher UI will have the credentials to access the registry if the workload is within the registry's scope. # Creating a Registry in Projects @@ -48,14 +46,28 @@ Prior to v2.6, secrets were required to be in a project scope. Projects are no l 1. In the upper left corner, click **☰ > Global Settings** in the dropdown. 1. Click **Feature Flags**. 1. Go to the `legacy` feature flag and click **Activate**. -1. Continue following [steps 1 - 9](#creating-a-registry-in-namespaces) above to create and save your project-level registry. Note that in Step 7 above, you will select the project rather than the namespace you want to use. +1. In the upper left corner, click **☰ > Cluster Management**. +1. Go to the cluster where you want to add a registry and click **Explore**. +1. In the left navigation, click either **Storage > Secrets** or **More Resources > Core > Secrets**. +1. Click **Create**. +1. Click **Registry**. +1. In the top navigation bar, filter to see only one project. +1. Enter a **Name** for the registry. + + >**Note:** Kubernetes classifies secrets, certificates, and registries all as [secrets](https://kubernetes.io/docs/concepts/configuration/secret/), and no two secrets in a project or namespace can have duplicate names. Therefore, to prevent conflicts, your registry must have a unique name among all secrets within your workspace. + +1. Select a namespace for the registry. +1. Select the website that hosts your private registry. Then enter credentials that authenticate with the registry. For example, if you use DockerHub, provide your DockerHub username and password. +1. Click **Save**. **Result:** -- Your secret is added to the project you chose. -- You can view the secret in the Rancher UI from the **Resources > Registries** view. +- Your secret is added to the individual project you chose. +- You can view the secret in the Rancher UI by clicking either **Storage > Secrets** or **More Resources > Core > Secrets**. - Any workload that you create in the Rancher UI will have the credentials to access the registry if the workload is within the registry's scope. +>**Note:** Project-scoped registries on the local cluster are only visible when a single project is selected. + # Using a Private Registry You can deploy a workload with an image from a private registry through the Rancher UI, or with `kubectl`. From 68c2bf1d3a6dfbdfda7829da9e02a9d4c8d9bec6 Mon Sep 17 00:00:00 2001 From: Jennifer Travinski Date: Tue, 16 Nov 2021 15:41:54 -0500 Subject: [PATCH 6/9] Updated directions for secrets --- content/rancher/v2.6/en/k8s-in-rancher/secrets/_index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/rancher/v2.6/en/k8s-in-rancher/secrets/_index.md b/content/rancher/v2.6/en/k8s-in-rancher/secrets/_index.md index ff7b9a391df..69a14af98e3 100644 --- a/content/rancher/v2.6/en/k8s-in-rancher/secrets/_index.md +++ b/content/rancher/v2.6/en/k8s-in-rancher/secrets/_index.md @@ -52,6 +52,8 @@ Prior to v2.6, secrets were required to be in a project scope. Projects are no l **Result:** Your secret is added to the individual project you chose. You can view the secret in the Rancher UI by clicking either **Storage > Secrets** or **More Resources > Core > Secrets**. +>**Note:** Project-scoped secrets on the local cluster are only visible when a single project is selected. + # What's Next? Now that you have a secret added to a namespace, you can add it to a workload that you deploy. From c7978ea97da8e4c00eb75d98b85fae2e6473b6eb Mon Sep 17 00:00:00 2001 From: Jennifer Travinski Date: Tue, 16 Nov 2021 15:45:10 -0500 Subject: [PATCH 7/9] Updated wording per feedback --- .../v2.6/en/cluster-admin/projects-and-namespaces/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/rancher/v2.6/en/cluster-admin/projects-and-namespaces/_index.md b/content/rancher/v2.6/en/cluster-admin/projects-and-namespaces/_index.md index cd309190b93..79fc054dc21 100644 --- a/content/rancher/v2.6/en/cluster-admin/projects-and-namespaces/_index.md +++ b/content/rancher/v2.6/en/cluster-admin/projects-and-namespaces/_index.md @@ -8,7 +8,7 @@ A namespace is a Kubernetes concept that allows a virtual cluster within a clust A project is a group of namespaces, and it is a concept introduced by Rancher. Projects allow you to manage multiple namespaces as a group and perform Kubernetes operations in them. You can use projects to support multi-tenancy, so that a team can access a project within a cluster without having access to other projects in the same cluster. ->**Note:** As of Rancher v2.6, projects are de-emphasized on the UI because you don't need them anymore to create secrets exclusively. However, it's still possible to create [secrets in projects]({{}}/rancher/v2.6/en/k8s-in-rancher/secrets/#creating-secrets-in-projects) if desired. +>**Note:** As of Rancher v2.6, projects are de-emphasized on the UI because it is no longer required to create any Kubernetes resources within a project scope. However, resources such as [Secrets]({{}}/rancher/v2.6/en/k8s-in-rancher/secrets/#creating-secrets-in-projects) can still be created in a project scope if the legacy feature flag is enabled. This section describes how projects and namespaces work with Rancher. It covers the following topics: From ed2ec2bd308da0edb880243c0660c155d955ae50 Mon Sep 17 00:00:00 2001 From: Jen Travinski Date: Wed, 17 Nov 2021 14:02:03 -0500 Subject: [PATCH 8/9] Update content/rancher/v2.6/en/k8s-in-rancher/registries/_index.md Co-authored-by: Billy Tat --- content/rancher/v2.6/en/k8s-in-rancher/registries/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/rancher/v2.6/en/k8s-in-rancher/registries/_index.md b/content/rancher/v2.6/en/k8s-in-rancher/registries/_index.md index ae3a0fd7b35..0b075b620d0 100644 --- a/content/rancher/v2.6/en/k8s-in-rancher/registries/_index.md +++ b/content/rancher/v2.6/en/k8s-in-rancher/registries/_index.md @@ -41,7 +41,7 @@ Currently, deployments pull the private registry credentials automatically only >**Prerequisites:** You must have a [private registry](https://docs.docker.com/registry/deploying/) available to use. -Prior to v2.6, secrets were required to be in a project scope. Projects are no longer required, and you may use the namespace scope instead. As a result, the Rancher UI was updated to reflect this new functionality. However, you may still create a project-scoped registry if desired. Use the following steps to do so: +Before v2.6, secrets were required to be in a project scope. Projects are no longer required, and you may use the namespace scope instead. As a result, the Rancher UI was updated to reflect this new functionality. However, you may still create a project-scoped registry if desired. Use the following steps to do so: 1. In the upper left corner, click **☰ > Global Settings** in the dropdown. 1. Click **Feature Flags**. From 0557fce0f1f0b07b925edc7611fd23da7f472e1d Mon Sep 17 00:00:00 2001 From: Jen Travinski Date: Wed, 17 Nov 2021 14:02:14 -0500 Subject: [PATCH 9/9] Update content/rancher/v2.6/en/k8s-in-rancher/secrets/_index.md Co-authored-by: Billy Tat --- content/rancher/v2.6/en/k8s-in-rancher/secrets/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/rancher/v2.6/en/k8s-in-rancher/secrets/_index.md b/content/rancher/v2.6/en/k8s-in-rancher/secrets/_index.md index 69a14af98e3..9c7f74220ea 100644 --- a/content/rancher/v2.6/en/k8s-in-rancher/secrets/_index.md +++ b/content/rancher/v2.6/en/k8s-in-rancher/secrets/_index.md @@ -38,7 +38,7 @@ Mounted secrets will be updated automatically unless they are mounted as subpath # Creating Secrets in Projects -Prior to v2.6, secrets were required to be in a project scope. Projects are no longer required, and you may use the namespace scope instead. As a result, the Rancher UI was updated to reflect this new functionality. However, you may still create project-scoped secrets if desired. Note that you have to first enable the `legacy` feature flag and look at a single project to do so. Use the following steps to set up your project-level secret: +Before v2.6, secrets were required to be in a project scope. Projects are no longer required, and you may use the namespace scope instead. As a result, the Rancher UI was updated to reflect this new functionality. However, you may still create project-scoped secrets if desired. Note that you have to first enable the `legacy` feature flag and look at a single project to do so. Use the following steps to set up your project-level secret: 1. In the upper left corner, click **☰ > Global Settings** in the dropdown. 1. Click **Feature Flags**.