I have the following image created by a Dockerfile:
REPOSITORY TAG IMAGE ID CREATED SIZE
ruby/lab latest f1903b1508cb 2 hours ago 729.6 MB
And I have my following YAML file:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: ruby-deployment
spec:
replicas: 2
template:
metadata:
labels:
app: ruby
spec:
containers:
- name: ruby-app
image: ruby/lab
imagePullPolicy: IfNotPresent
ports:
- containerPort: 4567
When I create the deployment I got the following info in the pods:
ruby-deployment-3830038651-sa4ii 0/1 ImagePullBackOff 0 7m
ruby-deployment-3830038651-u1tvc 0/1 ImagePullBackOff 0 7m
And the error Failed to pull image "ruby/lab:latest": Error: image ruby/lab not found
from below:
8m 2m 6 {kubelet minikube} spec.containers{ruby} Normal Pulling pulling image "ruby/lab:latest"
8m 2m 6 {kubelet minikube} spec.containers{ruby} Warning Failed Failed to pull image "ruby/lab:latest": Error: image ruby/lab not found
8m 2m 6 {kubelet minikube} Warning FailedSync Error syncing pod, skipping: failed to "StartContainer" for "ruby" with ErrImagePull: "Error: image ruby/lab not found"
Is really necessary to have registry in docker for this? I just want to make test locally and pass my code/repo to a friend for testing purposes
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…