Skip to content

Commit e475bf6

Browse files
authored
Merge pull request #42329 from dipankardas011/private-repo
added Note for secret in same namespace as the Deployment, Pods
2 parents 7675683 + 16fdb34 commit e475bf6

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

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

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ docker login
3838
When prompted, enter your Docker ID, and then the credential you want to use (access token,
3939
or the password for your Docker ID).
4040

41-
The login process creates or updates a `config.json` file that holds an authorization token. Review [how Kubernetes interprets this file](/docs/concepts/containers/images#config-json).
41+
The login process creates or updates a `config.json` file that holds an authorization token.
42+
Review [how Kubernetes interprets this file](/docs/concepts/containers/images#config-json).
4243

4344
View the `config.json` file:
4445

@@ -60,7 +61,8 @@ The output contains a section similar to this:
6061

6162
{{< note >}}
6263
If you use a Docker credentials store, you won't see that `auth` entry but a `credsStore` entry with the name of the store as value.
63-
In that case, you can create a secret directly. See [Create a Secret by providing credentials on the command line](#create-a-secret-by-providing-credentials-on-the-command-line).
64+
In that case, you can create a secret directly.
65+
See [Create a Secret by providing credentials on the command line](#create-a-secret-by-providing-credentials-on-the-command-line).
6466
{{< /note >}}
6567

6668
## Create a Secret based on existing credentials {#registry-secret-existing-credentials}
@@ -211,7 +213,14 @@ kubectl get pod private-reg
211213
```
212214

213215
{{< note >}}
214-
In case the Pod fails to start with the status `ImagePullBackOff`, view the Pod events:
216+
To use image pull secrets for a Pod (or a Deployment, or other object that
217+
has a pod template that you are using), you need to make sure that the appropriate
218+
Secret does exist in the right namespace. The namespace to use is the same
219+
namespace where you defined the Pod.
220+
{{< /note >}}
221+
222+
Also, in case the Pod fails to start with the status `ImagePullBackOff`, view the Pod events:
223+
215224
```shell
216225
kubectl describe pod private-reg
217226
```
@@ -229,12 +238,6 @@ Events:
229238
... FailedToRetrieveImagePullSecret ... Unable to retrieve some image pull secrets (<regcred>); attempting to pull the image may not succeed.
230239
```
231240

232-
233-
{{< /note >}}
234-
235-
236-
237-
238241
## {{% heading "whatsnext" %}}
239242

240243
* Learn more about [Secrets](/docs/concepts/configuration/secret/)

0 commit comments

Comments
 (0)