简体   繁体   English

使用minikube从本地Docker注册表中提取映像(带有自签名CA证书)

[英]Using minikube to pull image from local Docker registry (with self-signed CA certificate)

Using minikube to pull image from local Docker registry (with self-signed CA certificate) 使用minikube从本地Docker注册表中提取映像(带有自签名CA证书)

I'd like to be able to run minikube so that it can access a local docker registry using a self signed CA certificate. 我希望能够运行minikube,以便它可以使用自签名CA证书访问本地docker注册表。 Ideally the process should be automated so that I can use a *deployment.yaml file to pull the required image without intervention. 理想情况下,该过程应该是自动化的,以便我可以使用*deployment.yaml文件无需干预即可提取所需的图像。

At the moment I'm using a workaroud as follows: 目前,我正在如下使用workaroud:

#ssh into the minikube instance
sudo minikube ssh
#create a folder for the certificate
sudo mkdir /etc/docker/certs.d/dave.local:5000
#copy the crt file from the registry computer to the minikube instance
sudo scp user@192.168.1.2:/home/dave/certs/domain.crt /etc/docker/certs.d/dave.local:5000
#then check login
docker login dave.local:5000
#then pull image so that it's already in minikube
docker pull dave.local:5000/davedockerimage

I then edit the *deployment.yaml with imagePullPolicy: Never . 然后,我使用imagePullPolicy: Never编辑*deployment.yaml When I then run sudo kubectl create -f dave-deployment.yaml it finds dave.local:5000/davedockerimage locally on minikube it uses the already pulled image. 然后,当我运行sudo kubectl create -f dave-deployment.yaml它将在dave.local:5000/davedockerimage本地找到dave.local:5000/davedockerimage ,它使用已拉出的图像。

If imagePullPolicy: Always . 如果imagePullPolicy: Always The image pull fails in minikube. 图像拉取在minikube中失败。

I've been through a range of tutorials/stack overflow answers and have been unable to crack this. 我已经看过一系列教程/堆栈溢出答案,但无法破解。 Any help appreciated. 任何帮助表示赞赏。

作为在minikube中使用自签名证书的一种替代方法,您可以使用不安全的注册表选项启动minikube,如下所示:

minikube start --insecure-registry="dave.local:5000"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用自签名证书配置本地注册表 - Configuring local registry with self-signed certificate 使用自签名证书将本地Docker映像推送到私有存储库 - Pushing a local Docker image to a private repository with a self-signed certificate Minikube不会从本地Docker容器注册表中提取图像 - Minikube not pull image from local docker container registry 如何使用自签名证书通过TLS将Docker应用程序包推送到私有注册表 - How to push a Docker Application Package to private registry via TLS using a self-signed certificate Docker Swarm和自签名Docker Registry - Docker Swarm and self-signed Docker Registry 无法获取本地Kubernetes(minikube)从本地Docker注册表中提取 - Cannot get local Kubernetes (minikube) to pull from local Docker registry CircleCI中的自签名Docker注册表 - Self-signed docker registry in CircleCI 不安全 Docker 注册表和自签名证书 - Insecure Docker registry and self-signed certificates 如何使Drone Docker插件通过具有自签名TLS证书的自托管注册表进行身份验证 - How to make Drone Docker plugin to authenticate with a self-hosted registry having a self-signed TLS certificate 是否可以在Kubernetes中启动自签名Docker注册表并将其他服务用作该注册表来获取其映像? - Is it possible to start Self-Signed Docker Registry in Kubernetes and have other service use that as the registry to get its image?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM