mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-04-15 19:05:41 +00:00
tasks for adding registries and secrets
This commit is contained in:
@@ -3,118 +3,4 @@ title: Projects
|
||||
weight: 3650
|
||||
draft: true
|
||||
---
|
||||
<<<<<<< HEAD
|
||||
_Projects_ are a new feature in Rancher that allows you to group namespaces. Users can be added as members to the project, and the project owner can assign roles to each member to control their project access.
|
||||
=======
|
||||
Coming Soon
|
||||
|
||||
## Creating a Project
|
||||
|
||||
Coming Soon
|
||||
|
||||
## Switching Projects
|
||||
|
||||
Coming Soon
|
||||
|
||||
## Adding / Managing Project Members
|
||||
|
||||
Coming Soon
|
||||
|
||||
## Adding SSL Certificates
|
||||
|
||||
Coming Soon
|
||||
|
||||
## Adding Configuration Maps
|
||||
|
||||
Coming Soon
|
||||
|
||||
## Enabling Project Logging
|
||||
|
||||
Coming Soon
|
||||
|
||||
## Adding Project Alerts
|
||||
|
||||
Coming Soon
|
||||
|
||||
## Using Private Registries
|
||||
Private registries allow us to have repositories to hold containers that need to be private.
|
||||
Private registries can be added in the UI and images in the registry can be used
|
||||
while creating workloads. Registry can be added by providing a name, specifying
|
||||
the scope and credentials for the chosen repositry. The scope of the registry can
|
||||
be the one which is available to all namespaces or which is available to a
|
||||
single namespace.
|
||||
|
||||
In the UI,
|
||||
1. Click on 'Add registry'
|
||||
2. Provide a name
|
||||
3. Choose the scope of the registry
|
||||
4. Choose the Address [DockerHub, Quay.io, Custom]
|
||||
5. Provide credentials of the registry chosen
|
||||
6. Click 'Save'
|
||||
|
||||
Once a registry is added in rancher, the images in the registry can be chosen to
|
||||
create a workload
|
||||
|
||||
a. From the workloads section, click on deploy a workload
|
||||
b. Provide an image which is in the registry and choose the namespace
|
||||
Ex: quay.io/username/testubuntu
|
||||
c. Click on 'Launch'. The workload should get deployed successfully
|
||||
|
||||
|
||||
## Adding a Secret
|
||||
|
||||
Secrets are used to hold sensitive information such as passwords.
|
||||
Secret can be created in rancher by providing a name along with a keyvalue pair.
|
||||
|
||||
The scope of the secret can be the one which is available to all namespaces or
|
||||
which is available to a single namespace.
|
||||
A secret which is created as available to all namespaces can be used to create
|
||||
a workload in any namespace
|
||||
A secret which is created as available to a single namespace can be used to
|
||||
create to a workload in that single namespace
|
||||
|
||||
|
||||
In the UI,
|
||||
1. Click on 'Add secret'
|
||||
2. Provide a name
|
||||
3. Choose the scope of the secret
|
||||
4. Fill in the key value pair
|
||||
5. Click 'Save'
|
||||
|
||||
Once a secret is created, it can be used in a workload.
|
||||
A secret can be used in a workload in two ways:
|
||||
|
||||
1. A workload can be created by using secret as a volume
|
||||
|
||||
a. From the workloads section, click on 'Deploy'
|
||||
b. Provide a docker image and choose the namespace
|
||||
c. Click on volumes
|
||||
d. Provide a volume name and default mode
|
||||
e. Choose a secret which has been added
|
||||
f. Add a mount point (Eg: /test) and subpath if required
|
||||
g. Launch the workload
|
||||
|
||||
|
||||
Once the workload is deployed, right click on the workload and execute the shell.
|
||||
In the mount point provided while creating the workload, the secret keys can be
|
||||
seen as files. The contents of the file will be the value of the secret
|
||||
|
||||
2. A workload can be created by using secret as an env variable
|
||||
|
||||
a. From the workloads section, click on 'Deploy'
|
||||
b. Provide a docker image and choose the namespace
|
||||
c. Click on 'Environment variables' and 'add from source'
|
||||
d. Choose the type secret, source and keys. All keys or specific keys can be chosen
|
||||
e. Prefix or alias can also be provided
|
||||
g. Launch the workload
|
||||
|
||||
|
||||
## Launching a Catalog App
|
||||
|
||||
Coming Soon
|
||||
|
||||
## Creating a Pod Security Policy
|
||||
|
||||
Coming Soon
|
||||
|
||||
>>>>>>> 9b373cd6be3f10cc20618d77e14258158203f9fc
|
||||
|
||||
@@ -15,7 +15,7 @@ When creating a secret, you can make it available for any deployment within a pr
|
||||
|
||||
>**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. 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.
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
---
|
||||
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 or project containing the namespace that you want to add a secret to.
|
||||
|
||||
1. From the main menu, select **Resources > Registry**. 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 > Registry** 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,76 +0,0 @@
|
||||
---
|
||||
title: Using Registries
|
||||
weight:
|
||||
draft: true
|
||||
---
|
||||
## Using Private Registries
|
||||
Private registries allow us to have repositories to hold containers that need to be private.
|
||||
Private registries can be added in the UI and images in the registry can be used
|
||||
while creating workloads. Registry can be added by providing a name, specifying
|
||||
the scope and credentials for the chosen repositry. The scope of the registry can
|
||||
be the one which is available to all namespaces or which is available to a
|
||||
single namespace.
|
||||
|
||||
In the UI,
|
||||
1. Click on 'Add registry'
|
||||
2. Provide a name
|
||||
3. Choose the scope of the registry
|
||||
4. Choose the Address [DockerHub, Quay.io, Custom]
|
||||
5. Provide credentials of the registry chosen
|
||||
6. Click 'Save'
|
||||
|
||||
Once a registry is added in rancher, the images in the registry can be chosen to
|
||||
create a workload
|
||||
|
||||
a. From the workloads section, click on deploy a workload
|
||||
b. Provide an image which is in the registry and choose the namespace
|
||||
Ex: quay.io/username/testubuntu
|
||||
c. Click on 'Launch'. The workload should get deployed successfully
|
||||
|
||||
|
||||
## Adding a Secret
|
||||
|
||||
Secrets are used to hold sensitive information such as passwords.
|
||||
Secret can be created in rancher by providing a name along with a keyvalue pair.
|
||||
|
||||
The scope of the secret can be the one which is available to all namespaces or
|
||||
which is available to a single namespace.
|
||||
A secret which is created as available to all namespaces can be used to create
|
||||
a workload in any namespace
|
||||
A secret which is created as available to a single namespace can be used to
|
||||
create to a workload in that single namespace
|
||||
|
||||
|
||||
In the UI,
|
||||
1. Click on 'Add secret'
|
||||
2. Provide a name
|
||||
3. Choose the scope of the secret
|
||||
4. Fill in the key value pair
|
||||
5. Click 'Save'
|
||||
|
||||
Once a secret is created, it can be used in a workload.
|
||||
A secret can be used in a workload in two ways:
|
||||
|
||||
1. A workload can be created by using secret as a volume
|
||||
|
||||
a. From the workloads section, click on 'Deploy'
|
||||
b. Provide a docker image and choose the namespace
|
||||
c. Click on volumes
|
||||
d. Provide a volume name and default mode
|
||||
e. Choose a secret which has been added
|
||||
f. Add a mount point (Eg: /test) and subpath if required
|
||||
g. Launch the workload
|
||||
|
||||
|
||||
Once the workload is deployed, right click on the workload and execute the shell.
|
||||
In the mount point provided while creating the workload, the secret keys can be
|
||||
seen as files. The contents of the file will be the value of the secret
|
||||
|
||||
2. A workload can be created by using secret as an env variable
|
||||
|
||||
a. From the workloads section, click on 'Deploy'
|
||||
b. Provide a docker image and choose the namespace
|
||||
c. Click on 'Environment variables' and 'add from source'
|
||||
d. Choose the type secret, source and keys. All keys or specific keys can be chosen
|
||||
e. Prefix or alias can also be provided
|
||||
g. Launch the workload
|
||||
Reference in New Issue
Block a user