Skip to content

Commit 68d01e9

Browse files
authored
Merge pull request #1915 from aliusmiles/fix-pull-secret-docs
fix: kaniko custom-pull-secret documentation
2 parents 63ae530 + 833bad4 commit 68d01e9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/pages/configuration/images/kaniko.mdx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,9 @@ hooks:
196196
- secret
197197
- generic
198198
- custom-pull-secret
199+
- --type=kubernetes.io/dockerconfigjson
199200
- --from-literal
200-
- config.json='{ "credsStore":"ecr-login" }'
201+
- .dockerconfigjson='{ "credsStore":"ecr-login" }'
201202
when:
202203
before:
203204
images: all
@@ -207,16 +208,17 @@ hooks:
207208
:::note Building AWS ECR images on EKS
208209
If your EKS instance is [configured with access to ECR (see instance role permissions for AWS EKS and ECR)](https://docs.aws.amazon.com/AmazonECR/latest/userguide/ECR_on_EKS.html), your pull secret referenced by the `pullSecret` option, could be created with this kubectl command:
209210
```yaml
210-
kubectl create secret generic custom-pull-secret --from-literal config.json='{ "credsStore":"ecr-login" }'
211+
kubectl create secret generic custom-pull-secret --type=kubernetes.io/dockerconfigjson --from-literal .dockerconfigjson='{ "credsStore":"ecr-login" }'
211212
```
212213
The resulting Kubernetes secret would look like this:
213214
```yaml
214215
apiVersion: v1
215216
kind: Secret
217+
type: kubernetes.io/dockerconfigjson
216218
metadata:
217219
name: custom-pull-secret
218220
data:
219-
config.json: eyAiY3JlZHNTdG9yZSI6ImVjci1sb2dpbiIgfQ==
221+
.dockerconfigjson: eyAiY3JlZHNTdG9yZSI6ImVjci1sb2dpbiIgfQ==
220222
```
221223
If you define `pullSecret: custom-pull-secret` as shown in the example above, DevSpace will automatically mount this secret into the kaniko container and kaniko will be able to pull from and push to ECR.
222224
:::

0 commit comments

Comments
 (0)