I am using Windows 10 and install minikube. Minikube installation is successful. First I build Docker image locally with below Dockerfile
FROM openjdk:11-jdk ADD target/Spring-Blog-Jpa-0.0.1-SNAPSHOT.jar blog-app.jar EXPOSE 8080 ENTRYPOINT ["java","-Dfile.encoding=UTF8","-jar","blog-app.jar"]
docker build --tag blogapp:latest .
Image is built successfully and I can find the locally built Docker images:
> docker images REPOSITORY TAG IMAGE ID CREATED SIZE blogapp latest edab367fd20b 8 seconds ago 5.22GB
Then I try to make minikube pod with this image. The below is yaml file.
apiVersion: v1 kind: Pod metadata: name: blog-app spec: containers: - name: blog-app image: blogapp:latest imagePullPolicy: Always ports: - containerPort: 8080
But I cannot make Pod with the above yaml file. The log shows that the image cannot be pulled. The image is not registered on local Docker repository? If true, how can the locally built Docker image be used on Kubernetes on Windows 10?