thankful-optician-22583
08/05/2019, 4:21 PMconst image = new docker.Image(applicationName, {
imageName: config.require("ecr-server"),
build: "./app",
registry: {
server: config.require("ecr-server"),
username: config.require("ecr-username"),
password: config.require("ecr-password")
}
});
But when I want to use it for deployment of Kubernetes I notice there is a ImagePullBackOff
error.
const deployment = new k8s.apps.v1.Deployment(applicationName, {
apiVersion: "apps/v1",
kind: "Deployment",
metadata: {
name: applicationName
},
spec: {
selector: { matchLabels: appLabels },
template: {
metadata: { labels: appLabels },
spec: {
containers: [
{
name: applicationName,
image: image.imageName
}
]
}
}
}
});
When I investigated further using kubectl describe po
I see this error Failed to pull image "IMAGE": rpc error: code = Unknown desc = Error response from daemon: Get https//IMAGE: no basic auth credentials
How do i pass in the aws credentials to the “pulumi/kubernetes” object so that the deployment has access to the ecr?registry
for the Deployment classhandsome-actor-1155
08/05/2019, 5:18 PMthankful-optician-22583
08/05/2019, 5:20 PM