initial commit for registries and secrets

This commit is contained in:
Mark Bishop
2018-07-02 17:29:04 -07:00
5 changed files with 261 additions and 7 deletions
@@ -3,4 +3,118 @@ 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
@@ -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 or project containing the namespace that you want to add a secret to.
1. From the main menu, select **Resources > Secret**. 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.
>
> ![Bulk Key Value Pair Copy/Paste]({{< baseurl >}}/img/rancher/bulk-key-values.gif)
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).
@@ -0,0 +1,41 @@
---
title: Adding ConfigMaps
weight:
draft: true
---
ConfigMaps store general configuration information for an application, such as configuration files, command-line arguments, environment variables, etc. ConfigMaps accept key value pairs in common string formats, like config files or JSON blobs. Add ConfigMaps to your Rancher workspaces so that you can add them to your workloads later. For more information on ConfigMaps, see the official [Kubernetes Documentation: Using ConfigMap](https://kubernetes-v1-4.github.io/docs/user-guide/configmap/).
>**Note:** ConfigMaps can only be applied to namespaces and not projects.
1. From the **Global** view, select the project containing the namespace that you want to add a ConfigMap to.
1. From the main menu, select **Resources > Certificates**. Click **Add Certificate**.
1. Enter a **Name** for the certificate.
>**Note:** Kubernetes classifies ConfigMaps 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 ConfigMaps must have a unique name among the other certificates, ConfigMaps, registries, and secrets within your workspace.
1. Click on **Add Config Map** option and give it a name.
1. Select the **Namespace** you want to add a ConfigMap to. You can also add a new namespace on the fly by clicking **Add to a new namespace**.
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.
>**Note:** Don't use ConfigMaps to store sensitive data.
>
>**Tip:** You can add multiple key value pairs to the ConfigMap by copying and pasting.
>
> ![Bulk Key Value Pair Copy/Paste]({{< baseurl >}}/img/rancher/bulk-key-values.gif)
1. Click **Save**.
**Result:** Your ConfigMap is added to the namespace. You can view it in the Rancher UI from the **Resources > Config Maps** view.
## What's Next?
Now that you have a ConfigMap added to a namespace, you can add it to a workload that you deploy from the namespace of origin.
For more information on adding ConfigMaps to a workload, see [Deploying Workloads](../../workloads/deploy-workloads).
@@ -1,6 +0,0 @@
---
title: Using Private Registries
weight:
draft: true
---
Coming Soon
@@ -0,0 +1,76 @@
---
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