mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-24 20:18:18 +00:00
Merge pull request #386 from MBishop17/soumyalj-secretsandreg
Soumyalj secretsandreg
This commit is contained in:
@@ -3,4 +3,33 @@ title: Adding a Secret
|
||||
weight:
|
||||
draft: true
|
||||
---
|
||||
Coming Soon
|
||||
|
||||
[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.
|
||||
When creating a secret, you can make it available for any deployment within a project, or you can limit it to a single namespace.
|
||||
|
||||
1. From the **Global** view, select the project containing the namespace(s) where you want to add a secret.
|
||||
|
||||
1. From the main menu, select **Resources > Secrets**. Click **Add Secret**.
|
||||
|
||||
1. Enter a **Name** for the secret.
|
||||
|
||||
>**Note:** Kubernetes classifies secrets, certificates, ConfigMaps, 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 secret must have a unique name among all secrets within your workspace.
|
||||
|
||||
1. Select a **Scope** for the secret.
|
||||
|
||||
1. 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.
|
||||
>
|
||||
> 
|
||||
|
||||
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?
|
||||
|
||||
Now that you have a secret added to the project or namespace, you can add it to a workload that you deploy.
|
||||
|
||||
For more information on adding secret to a workload, see [Deploying Workloads](../../workloads/deploy-workloads).
|
||||
|
||||
@@ -20,13 +20,13 @@ ConfigMaps store general configuration information for an application, such as c
|
||||
|
||||
1. From **Config Map Values**, click **Add Config Map Value** to add a key value pair to your ConfigMap. Add as many values as you need.
|
||||
|
||||
|
||||
1. Click **Save**.
|
||||
|
||||
>**Note:** Don't use ConfigMaps to store sensitive data [use a secret](../add-a-secret).
|
||||
>
|
||||
>**Tip:** You can add multiple key value pairs to the ConfigMap by copying and pasting.
|
||||
>
|
||||
> 
|
||||
|
||||
|
||||
**Result:** Your ConfigMap is added to the namespace. You can view it in the Rancher UI from the **Resources > Config Maps** view.
|
||||
|
||||
@@ -37,4 +37,4 @@ Now that you have a ConfigMap added to a namespace, you can add it to a workload
|
||||
- Application environment variables.
|
||||
- Specifying parameters for a Volume mounted to the workload.
|
||||
|
||||
For more information on adding ConfigMaps to a workload, see [Deploying Workloads](../../workloads/deploy-workloads).
|
||||
For more information on adding ConfigMaps to a workload, see [Deploying Workloads](../../workloads/deploy-workloads).
|
||||
@@ -0,0 +1,33 @@
|
||||
---
|
||||
title: Adding Registries
|
||||
weight:
|
||||
draft: true
|
||||
---
|
||||
|
||||
Registries are secrets containing credentials used to authenticate with [private registries](https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/). Deployments use these secrets to authenticate with a private registry and then pull a Docker image hosted on it.
|
||||
|
||||
>**Prerequisites:** You must have a [private registry](https://docs.docker.com/registry/deploying/) configured.
|
||||
|
||||
>**Note:** Currently, credentials are pulled automatically only if the workload is created in the Rancher UI and not kubectl.
|
||||
|
||||
1. From the **Global** view, select the project containing the namespace(s) where you want to add a registry.
|
||||
|
||||
1. From the main menu, select **Resources > Registries**. Click **Add Registry**.
|
||||
|
||||
1. Enter a **Name** for the registry.
|
||||
|
||||
>**Note:** Kubernetes classifies secrets, certificates, ConfigMaps, 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 **Scope** for the registry.
|
||||
|
||||
1. Select the website that hosts your private registry. Then enter credentials that authenticate with the registry.
|
||||
|
||||
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 > Registries** view.
|
||||
|
||||
## What's Next?
|
||||
|
||||
Now that you have a registry added to the project or namespace, you can add it to a workload that's deploying an image from your private registry.
|
||||
|
||||
For more information on adding a registry to a workload, see [Deploying Workloads](../../workloads/deploy-workloads).
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
title: Using Private Registries
|
||||
weight:
|
||||
draft: true
|
||||
---
|
||||
Coming Soon
|
||||
Reference in New Issue
Block a user