Closed Sean-OConnor-VA closed 3 years ago
@Sean-OConnor-VA - Hmm, I'll have to go back in a bit and take a look at it. I might've also been setting up for a different example and never documented it correctly!
Ran into this as well. I just ended up cloning the repo/build/pushed to my own docker hub account.
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read this blog post to see the reasons why I mark issues as stale.
Not stale.
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.
Wait what? Bugs shouldn't be closed!
This issue is no longer marked for closure.
Here is tidied up log that attempts to illustrate the problem. I logged into Docker Hub to simplify things. I pasted in the command to create the hello-go deployment directly from the PDF of your book of the course.
I have only been able to create a deployment that uses the latest version of the hello.go executable.
$ docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
...
Login Succeeded
$ minikube start
...
🏄 Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
$
$ ################# Command pasted from your book
$ kubectl create deployment hello-go --image=geerli\
> ngguy/kube101-go:1.0.0
deployment.apps/hello-go created
$ kubectl describe pod -l app=hello-go
Name: hello-go-5944979865-9zh76
Namespace: default
Priority: 0
Node: minikube/192.168.49.2
...
Status: Pending
...
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 20s default-scheduler Successfully assigned default/hello-go-5944979865-9zh76 to minikube
Normal BackOff 16s kubelet Back-off pulling image "geerlingguy/kube101-go:1.0.0"
Warning Failed 16s kubelet Error: ImagePullBackOff
Normal Pulling 6s (x2 over 19s) kubelet Pulling image "geerlingguy/kube101-go:1.0.0"
Warning Failed 4s (x2 over 17s) kubelet Failed to pull image "geerlingguy/kube101-go:1.0.0": rpc error: code = Unknown desc = Error response from daemon: pull access denied for geerlingguy/kube101-go, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
Warning Failed 4s (x2 over 17s) kubelet Error: ErrImagePull
$
$ kubectl delete deployment hello-go
deployment.apps "hello-go" deleted
$
$ ############# This command that uses a label on your kube101 repository in Docker Hub works.
$
$ kubectl create deployment hello-go --image=geerlingguy/kube101:hello-go
deployment.apps/hello-go created
$
$ kubectl describe pod -l app=hello-go
Name: hello-go-57db6d78c7-hwqhh
Namespace: default
Priority: 0
Node: minikube/192.168.49.2
...
Status: Running
...
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 4s default-scheduler Successfully assigned default/hello-go-57db6d78c7-hwqhh to minikube
Normal Pulled 2s kubelet Container image "geerlingguy/kube101:hello-go" already present on machine
Normal Created 2s kubelet Created container kube101
Normal Started 1s kubelet Started container kube101
$
$
Okay, so finally took the time to run through Chapter 3 in its entirety—I just pushed an update to the book containing a bit of a rewrite in places—and I think I better understand the confusion in this issue.
As stated in the book text and README, the image pull is expected to fail—and that's part of the lesson I'm trying to demonstrate in Ep/Ch 3. I have the image repo set to private to illustrate how to set up a registry credential in Kubernetes. But to make the rest of the examples in the chapter work better, I also added a new -v2
tag to my geerlingguy/kube101:hello-go
image.
So please see the updated text in the book (which includes a new bit of warning text at the top of the example to try to head off confusion) for a hopefully clearer demonstration of this example.
Thanks everyone for chiming in here!
Hey Jeff, looks like you renamed your dockerhub repo from geerlingguy/kube101-go:1.0.0 to geerlingguy/kube101:hello-go
This in particular affects episode 3 - thanks again for all you do and congrats on the new addition!