saltik
June 25, 2018, 11:43am
1
Hi everyone,
I got error while deploying our microservices to our kubernetes cluster using
$ rp generate-kubernetes-resources 123456789000.dkr.ecr.eu-west-1.amazonaws.com/my-microservice-api-implementation:1.0-SNAPSHOT --generate-pod-controllers --generate-services --pod-controller-image-pull-policy Always --env JAVA_OPTS="-Dplay.http.secret.key=sample-secret-key -Dplay.filters.hosts.allowed.0=." --pod-controller-replicas 2 --external-service "cas_native=cassandra.default.svc.cluster.local" --external-service "kafka_native=ulterior-guppy-kafka-headless.default.svc.cluster.local" | kubectl apply -f -
It returns to me:
[error, com.lightbend.rp.reactivecli.Main$] Failed to obtain Docker config for 123456789000.dkr.ecr.eu-west-1.amazonaws.com/my-microservice-api-implementation:1.0-SNAPSHOT, unable to access repository or registry; check authentication [401]
Unable to connect to the server: dial tcp 192.168.99.100:8443: i/o timeout
We use amazon web services for private docker registries, is this error related about AWS ECR ?
How can we solve this problem?
Jules
(Jules Ivanic)
June 25, 2018, 12:02pm
2
Hi @saltik ,
rp says you that it’s unable to login to your private docker registry.
Two options: Give it the informations necessary to make it logs in successfully or you could also use the rp --registry-use-local
option
Jules
saltik
June 25, 2018, 12:08pm
3
How can I give this necessary information, any example ?
--registry-use-local
gives me Unable to connect to the server: dial tcp 192.168.99.100:8443: i/o timeout
saltik
June 25, 2018, 12:15pm
4
rp decribes docker images with this format.
docker-images Docker images to be deployed. Format: [<registry host>/][<repo>/]image[:tag]
my registry is: 123456789000.dkr.ecr.eu-west-1.amazonaws.com/my-microservice-api-implementation:1.0-SNAPSHOT
I need to add repo before image, is this a format error ?
saltik
June 25, 2018, 12:27pm
5
I tried with the updated private ragistry that has repo, but nothing changes.
Jules
(Jules Ivanic)
June 25, 2018, 12:37pm
6
Here’s what I do:
rp generate-kubernetes-resources "eu.gcr.io/myrepo-177524/dev/user-impl:latest" --generate-pod-controllers --generate-services --registry-use-local --pod-controller-replicas 3 --pod-controller-image-pull-policy Always > deploy/resources/myapp/user.yaml
I hope it could help you.
Hi guys,
Do you have working solution for this?
I am getting this error while i am trying to my docker images pushing to ibm cloud. My example rp command is like that:
rp generate-kubernetes-resources "$REGISTRY/$NAMESPACE/example-api-impl:1.0-SNAPSHOT" \
--generate-pod-controllers --generate-services \
--pod-controller-image-pull-policy Always \
--env JAVA_OPTS="-Dplay.http.secret.key=$example_secret \
-Dplay.filters.hosts.allowed.0=$allowed_host" \
--external-service "cas_native=$cassandra_svc" \
--external-service "kafka_native=$service_kafka" \
--pod-controller-replicas 2 | kubectl apply -f -
Error:
[error, com.lightbend.rp.reactivecli.docker.DockerRegistry$] Unable to obtain an OAuth token (401 {"errors":[{"code":"UNAUTHORIZED","message":"authentication required","detail":[{"Type":"repository","Class":"","Name":"ibm/example-api-impl","Action":"pull"}]}]}
)
[error, com.lightbend.rp.reactivecli.Main$] Failed to obtain Docker config for registry.eu-de.bluemix.net/ibm/example-api-impl:1.0-SNAPSHOT, unable to access repository or registry; check authentication [401]
My rp version:
rp (Reactive CLI) 1.2.0
jq support: Available
aklikic
(Alan Klikic)
December 7, 2018, 9:35am
8
This was a bug and solved in reactive-cli 1.3.2
The current authentication code relies on a
Bearer Token to be generated at some point.
Some docker repositories, instead, rely on
basic authentication, notably...
changed 1 files
with 16 additions
and 17 deletions .