Hi I am new to minikube/k8s and trying to setup a first job in pod. I am running on windows and keep on getting error while pulling image.
My docker has already has image that i have used in job.yaml but minikube is failing with
Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 28s default-scheduler Successfully assigned default/say-something-blbwp to minikube Normal Pulling 27s kubelet, minikube Pulling image "java" Warning Failed 17s kubelet, minikube Failed to pull image "java": rpc error: code = Unknown desc = Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 192.168.67.65:53: read udp 192.168.67.70:58499->192.168.67.65:53: i/o timeout Warning Failed 17s kubelet, minikube Error: ErrImagePull Normal BackOff 17s kubelet, minikube Back-off pulling image "java" Warning Failed 17s kubelet, minikube Error: ImagePullBackOff
Here is my job.yaml file
apiVersion: batch/v1 kind: Job metadata: name: say-something spec: template: metadata: name: say-something spec: containers: - name: say-something image: java imagePullPolicy: IfNotPresent command: [System.out.println("ZXZAA:")] restartPolicy: OnFailure
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE hello-world latest bf756fb1ae65 7 months ago 13.3kB java latest d23bdf5b1b1b 3 years ago 643MB
Can someone please guide on what I am missing? Any specific settings I need to do on registry part?
java
? hub.docker.com/_/java redirects to the page for theopenjdk
image. (You can't write Java code in the "command" part of the job spec, and you probably need to build a custom image for this.) – David Maze