Updated directions for registries

This commit is contained in:
Jennifer Travinski
2021-11-16 15:41:37 -05:00
parent b8edb209df
commit ca6010df11
@@ -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`.