2

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

Cedric Druck
  • 1,032
  • 7
  • 20
stephen newman
  • 533
  • 4
  • 17

1 Answers1

0

You have the status of "ErrImagePull" which describes the pod state, try doing kubectl describe PODNAME -n NSNAME and see the complete description. Then you can find out what's happening. Probably you can find the image name and pull it manually: docker search IMAGENAME on your worker node: docker pull IMAGENNAME:TAG if it fails, There's a chance that image was probably removed. Any case you need to provide more info.

madmesi
  • 1
  • 3