Skip to content

Commit d9a041e

Browse files
authored
Merge pull request #30067 from sftim/20211013_tidy_pull_image_private_registry_task
Tidy task “Pull an Image from a Private Registry”
2 parents bf1a799 + 8230d25 commit d9a041e

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

content/en/docs/tasks/configure-pod-container/pull-image-private-registry.md

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,34 @@ weight: 100
66

77
<!-- overview -->
88

9-
This page shows how to create a Pod that uses a Secret to pull an image from a
10-
private Docker registry or repository.
9+
This page shows how to create a Pod that uses a
10+
{{< glossary_tooltip text="Secret" term_id="secret" >}} to pull an image from a
11+
private container image registry or repository.
12+
13+
{{% thirdparty-content single="true" %}}
1114

1215
## {{% heading "prerequisites" %}}
1316

14-
* {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
17+
* {{< include "task-tutorial-prereqs.md" >}}
1518

16-
* To do this exercise, you need a
17-
[Docker ID](https://docs.docker.com/docker-id/) and password.
19+
* To do this exercise, you need the `docker` command line tool, and a
20+
[Docker ID](https://docs.docker.com/docker-id/) for which you know the password.
1821

1922
<!-- steps -->
2023

21-
## Log in to Docker
24+
## Log in to Docker Hub
25+
26+
On your laptop, you must authenticate with a registry in order to pull a private image.
2227

23-
On your laptop, you must authenticate with a registry in order to pull a private image:
28+
Use the `docker` tool to log in to Docker Hub. See the _log in_ section of
29+
[Docker ID accounts](https://docs.docker.com/docker-id/#log-in) for more information.
2430

2531
```shell
2632
docker login
2733
```
2834

29-
When prompted, enter your Docker username and password.
35+
When prompted, enter your Docker ID, and then the credential you want to use (access token,
36+
or the password for your Docker ID).
3037

3138
The login process creates or updates a `config.json` file that holds an authorization token.
3239

@@ -171,14 +178,14 @@ You have successfully set your Docker credentials as a Secret called `regcred` i
171178

172179
## Create a Pod that uses your Secret
173180

174-
Here is a configuration file for a Pod that needs access to your Docker credentials in `regcred`:
181+
Here is a manifest for an example Pod that needs access to your Docker credentials in `regcred`:
175182

176183
{{< codenew file="pods/private-reg-pod.yaml" >}}
177184

178-
Download the above file:
185+
Download the above file onto your computer:
179186

180187
```shell
181-
wget -O my-private-reg-pod.yaml https://k8s.io/examples/pods/private-reg-pod.yaml
188+
curl -L -O my-private-reg-pod.yaml https://k8s.io/examples/pods/private-reg-pod.yaml
182189
```
183190

184191
In file `my-private-reg-pod.yaml`, replace `<your-private-image>` with the path to an image in a private registry such as:
@@ -200,10 +207,10 @@ kubectl get pod private-reg
200207

201208
## {{% heading "whatsnext" %}}
202209

203-
* Learn more about [Secrets](/docs/concepts/configuration/secret/).
210+
* Learn more about [Secrets](/docs/concepts/configuration/secret/)
211+
* or read the API reference for {{< api-reference page="config-and-storage-resources/secret-v1" >}}
204212
* Learn more about [using a private registry](/docs/concepts/containers/images/#using-a-private-registry).
205213
* Learn more about [adding image pull secrets to a service account](/docs/tasks/configure-pod-container/configure-service-account/#add-imagepullsecrets-to-a-service-account).
206214
* See [kubectl create secret docker-registry](/docs/reference/generated/kubectl/kubectl-commands/#-em-secret-docker-registry-em-).
207-
* See [Secret](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#secret-v1-core).
208-
* See the `imagePullSecrets` field of [PodSpec](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podspec-v1-core).
215+
* See the `imagePullSecrets` field within the [container definitions](/docs/reference/kubernetes-api/workload-resources/pod-v1/#containers) of a Pod
209216

0 commit comments

Comments
 (0)