From e15589ec482746ddd72b5c8b5a7d89927e3c52fc Mon Sep 17 00:00:00 2001 From: Catherine Luse Date: Mon, 1 Jul 2019 16:12:54 -0700 Subject: [PATCH] Minor changes to docs about private registry --- .../v2.x/en/k8s-in-rancher/registries/_index.md | 10 +++++++--- newfile | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 newfile diff --git a/content/rancher/v2.x/en/k8s-in-rancher/registries/_index.md b/content/rancher/v2.x/en/k8s-in-rancher/registries/_index.md index 44a31d3a61d..7a2b342191c 100644 --- a/content/rancher/v2.x/en/k8s-in-rancher/registries/_index.md +++ b/content/rancher/v2.x/en/k8s-in-rancher/registries/_index.md @@ -56,9 +56,11 @@ To deploy a workload with an image from your private registry, ### Using the Private Registry with kubectl -When you create the workload using `kubectl`, you need to configure the pod so that its YAML has the path to the private registry. You also have to specify the registry secret because the pod only automatically gets access to the private registry credentials if it is created in the Rancher UI. +When you create the workload using `kubectl`, you need to configure the pod so that its YAML has the path to the image in the private registry. You also have to create and reference the registry secret because the pod only automatically gets access to the private registry credentials if it is created in the Rancher UI. -Below is an example `pod.yml` for a workload that uses an image from a private registry. In this example, the pod uses an image from Quay.io, and the .yml specifies the path to the image. The pod authenticates with the registry using credentials stored in a Kubernetes secret called `testquay`, which is specified in `spec.imagePullSecrets.name`: +The secret has to be created in the same namespace where the workload gets deployed. + +Below is an example `pod.yml` for a workload that uses an image from a private registry. In this example, the pod uses an image from Quay.io, and the .yml specifies the path to the image. The pod authenticates with the registry using credentials stored in a Kubernetes secret called `testquay`, which is specified in `spec.imagePullSecrets` in the `name` field: ``` apiVersion: v1 @@ -73,7 +75,9 @@ spec: - name: testquay ``` -You can use `kubectl` to create the secret with the private registry credentials. In this example, the secret is named `testquay`: +In this example, the secret named `testquay` is in the default namespace. + +You can use `kubectl` to create the secret with the private registry credentials. This command creates the secret named `testquay`: ``` kubectl create secret docker-registry testquay \ diff --git a/newfile b/newfile new file mode 100644 index 00000000000..3df46ad1902 --- /dev/null +++ b/newfile @@ -0,0 +1 @@ +fun