Skip to content

Commit 7a8ef52

Browse files
authored
Merge pull request #26565 from tengqm/fix-26494
Fix dockerhub API URL
2 parents 688fa0c + 18c22d1 commit 7a8ef52

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

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

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,13 @@ weight: 100
99
This page shows how to create a Pod that uses a Secret to pull an image from a
1010
private Docker registry or repository.
1111

12-
13-
1412
## {{% heading "prerequisites" %}}
1513

16-
1714
* {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
1815

1916
* To do this exercise, you need a
2017
[Docker ID](https://docs.docker.com/docker-id/) and password.
2118

22-
23-
2419
<!-- steps -->
2520

2621
## Log in to Docker
@@ -106,7 +101,8 @@ kubectl create secret docker-registry regcred --docker-server=<your-registry-ser
106101

107102
where:
108103

109-
* `<your-registry-server>` is your Private Docker Registry FQDN. (https://index.docker.io/v1/ for DockerHub)
104+
* `<your-registry-server>` is your Private Docker Registry FQDN.
105+
Use `https://index.docker.io/v2/` for DockerHub.
110106
* `<your-name>` is your Docker username.
111107
* `<your-pword>` is your Docker password.
112108
* `<your-email>` is your Docker email.
@@ -192,7 +188,8 @@ your.private.registry.example.com/janedoe/jdoe-private:v1
192188
```
193189

194190
To pull the image from the private registry, Kubernetes needs credentials.
195-
The `imagePullSecrets` field in the configuration file specifies that Kubernetes should get the credentials from a Secret named `regcred`.
191+
The `imagePullSecrets` field in the configuration file specifies that
192+
Kubernetes should get the credentials from a Secret named `regcred`.
196193

197194
Create a Pod that uses your Secret, and verify that the Pod is running:
198195

@@ -201,17 +198,12 @@ kubectl apply -f my-private-reg-pod.yaml
201198
kubectl get pod private-reg
202199
```
203200

204-
205-
206201
## {{% heading "whatsnext" %}}
207202

208-
209203
* Learn more about [Secrets](/docs/concepts/configuration/secret/).
210204
* Learn more about [using a private registry](/docs/concepts/containers/images/#using-a-private-registry).
211205
* 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).
212206
* See [kubectl create secret docker-registry](/docs/reference/generated/kubectl/kubectl-commands/#-em-secret-docker-registry-em-).
213207
* See [Secret](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#secret-v1-core).
214208
* See the `imagePullSecrets` field of [PodSpec](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#podspec-v1-core).
215209

216-
217-

0 commit comments

Comments
 (0)