kubectl run from local docker image? kubectl run from local docker image? kubernetes kubernetes

kubectl run from local docker image?


Kubernetes Pods have an imagePullPolicy field. If you set that to Never, it will never try to pull an image, and it's up to you to ensure that the docker daemon which the kubelet is using contains that image. The default policy is IfNotPresent, which should work the same as Never if an image is already present in the docker daemon. Double check that your docker daemon actually contains what you think it contains, and make sure your imagePullPolicy is set to one of the two that I mentioned.

apiVersion: v1kind: Podmetadata:  name: my-podspec:  containers:    - name: my-image      image: local-image-name      imagePullPolicy: Never