我使用 docker-desktop for mac 进行了简单的设置,并附带了 Kubernetes 集群。
每次我运行skaffold dev
, with 时imagePullPolicy: Never
,都会创建一个映像,但在将脏映像部署到 Kubernetes 集群时仍然出现错误:
ErrImageNeverPull: Container image "user/test:bf13343a4b431df2b7df84f58ede9229bd3d868a4b10147fff04eae8a7adc0cd" is not present with pull policy of Never
谁能帮我调试一下?我不知道如何进一步调查。但是skaffold
没有将我的脏镜像部署到 Kubernetes 集群。每个人都建议添加imagePullPolicy: Never
到我的deployment.yaml
,但这并不能解决任何问题
skaffold.yml 内容:
apiVersion: skaffold/v2beta5
kind: Config
metadata:
name: test
build:
artifacts:
- image: user/test
deploy:
kubectl:
manifests:
- kube/postgres/postgres-configmap.dev.yaml
- kube/redis/redis-configmap.secret.yaml
- kube/web/web-configmap.dev.yaml
- kube/elasticsearch/elasticsearch-storage.dev.yaml
- kube/postgres/postgres-storage.dev.yaml
- kube/cable/cable-service.yaml
- kube/dashboard.yaml
- kube/cable/cable-deployment.yaml
- kube/nginx/load-balancer.dev.yaml
- kube/redis/redis-storage.yaml
- kube/sidekiq/sidekiq-deployment.yaml
- kube/web/web-deployment.yaml
- kube/web/web-service.dev.yaml
- kube/web/web-migration.yaml
- kube/web/web-seed.yaml