deploying spring-cloud-kubernetes kubernetes-hello-world-example fails

6/1/2019

I am trying to run the 1.0.1.RELEASE version of the example https://github.com/spring-cloud/spring-cloud-kubernetes/tree/master/spring-cloud-kubernetes-examples/kubernetes-hello-world-example but it fails with this error in both minikube and in gcloud: Cannot pull image 'cloud/kubernetes-hello-world:1.0.1.RELEASE' from the registry.

I first worked through the example kubia in Kubernetes in Action , and it ran in both minikube and gcloud.

There is a warning in the example readme about a problem with the actuator health path and I figured out how to fix it by editing in kubectl, but this didn't help.

That suggests the image cannot be found in docker. I had run 'gcloud auth configure-docker' to configure the local docker to gcloud. The build 'mvn fabric8:deploy -Pkubernetes' seem to work, there were non-fatal javadoc errors:

[INFO] Creating a Deployment from kubernetes.yml namespace default name kubernetes-hello-world
[INFO] Created Deployment: spring-cloud-kubernetes-examples/kubernetes-hello-world-example/target/fabric8/applyJson/default/deployment-kubernetes-hello-world-2.json
[INFO] F8: HINT: Use the command `kubectl get pods -w` to watch your pods start up
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS

The image seems to be present in docker

stephens-MacBook-Pro:kubernetes-hello-world-example stephen$ docker images
REPOSITORY                        TAG                 IMAGE ID            CREATED             SIZE
cloud/kubernetes-hello-world      1.0.1.RELEASE       1b71ed3f02fb        10 minutes ago      464MB

kubectl get pods -w returns

kubernetes-hello-world-984b55c69-8t2qg   0/1   ErrImagePull   0     3m19s
kubernetes-hello-world-984b55c69-8t2qg   0/1   ImagePullBackOff   0     3m30s
-- stephen newman
fabric8-maven-plugin
kubernetes
spring-cloud-kubernetes

0 Answers