Merge pull request #2151 from catherineluse/secrets

Make registry page more discoverable from secrets page
This commit is contained in:
Catherine Luse
2019-12-31 13:50:01 -07:00
committed by GitHub
2 changed files with 14 additions and 6 deletions
@@ -16,6 +16,8 @@ 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
>**Prerequisites:** You must have a [private registry](https://docs.docker.com/registry/deploying/) available to use.
1. From the **Global** view, select the project containing the namespace(s) where you want to add a registry.
@@ -40,7 +42,7 @@ 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.
## Using a Private Registry
# Using a Private Registry
You can deploy a workload with an image from a private registry through the Rancher UI, or with `kubectl`.
@@ -7,9 +7,13 @@ aliases:
[Secrets](https://kubernetes.io/docs/concepts/configuration/secret/#overview-of-secrets) store sensitive data like passwords, tokens, or keys. They may contain one or more key value pairs.
> This page is about secrets in general. For details on setting up a private registry, refer to the section on [registries.]({{<baseurl>}}/rancher/v2.x/en/k8s-in-rancher/registries)
When configuring a workload, you'll be able to choose which secrets to include. Like config maps, secrets can be referenced by workloads as either an environment variable or a volume mount.
>**Note:** Any update to an active secrets won't automatically update the pods that are using it. Restart those pods to have them use the new secret.
Any update to an active secrets won't automatically update the pods that are using it. Restart those pods to have them use the new secret.
# Creating Secrets
When creating a secret, you can make it available for any deployment within a project, or you can limit it to a single namespace.
@@ -25,15 +29,17 @@ When creating a secret, you can make it available for any deployment within a pr
5. From **Secret Values**, click **Add Secret Value** to add a key value pair. Add as many values as you need.
>**Tip:** You can add multiple key value pairs to the secret by copying and pasting.
>
> {{< img "/img/rancher/bulk-key-values.gif" "Bulk Key Value Pair Copy/Paste">}}
>**Tip:** You can add multiple key value pairs to the secret by copying and pasting.
>
> {{< img "/img/rancher/bulk-key-values.gif" "Bulk Key Value Pair Copy/Paste">}}
1. Click **Save**.
**Result:** Your secret is added to the project or namespace, depending on the scope you chose. You can view the secret in the Rancher UI from the **Resources > Secrets** view.
## What's Next?
Any update to an active secrets won't automatically update the pods that are using it. Restart those pods to have them use the new secret.
# What's Next?
Now that you have a secret added to the project or namespace, you can add it to a workload that you deploy.