Created a simple MVC app in VS2019. Created a Dockerfile and ran docker build successfully.
Was able to successfully run with:
docker run -d -p 8080:80 --name mvc2 mvc2
browsing to localhost:8080 opens up mvc home page.
Issue is that when I deploy to minikube I get ErrImageNeverPull
My deployment.yaml:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: mvc
spec:
replicas: 1
template:
metadata:
labels:
app: mvc
spec:
containers:
- name: mvc
imagePullPolicy: Never # <-- here we go!
image: mvc2:latest
ports:
- containerPort: 80
Probably you missed performing the eval
of Minikube Docker env ( eval $(minikube docker-env)
on Unix like but, since you're running Win, minikube docker-env | Invoke-Expression
) before creating the Docker image.
So, right now, you have two options:
mvc2:latest
image using the Docker save command mvc2:latest
image using the Docker environment variables in order to get it saved on Minikube .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.