出于安全考虑,我需要使用私有 Harbor 存储库(它作为代理)安装Minikubeharbor.mycompany.com
- .
minikube start
有几个使用 repos 的选项:
--registry-mirror
--mirror-repository
--insecure-registry
没有私人仓库的安装效果很好。但我不知道如何正确设置私人港口回购。例如这种方式:
minikube start --registry-mirror https://harbor.mycompany.com
仍然从公共回购安装。使用
minikube start --image-repository harbor.mycompany.com --insecure-registry harbor.mycompany.com
我有:
! The image 'harbor.mycompany.com/kubernetesui/dashboard:v2.3.1' was not found; unable to add it to cache.
! The image 'harbor.mycompany.com/kube-controller-manager:v1.22.3' was not found; unable to add it to cache.
! The image 'harbor.mycompany.com/kube-proxy:v1.22.3' was not found; unable to add it to cache.
! The image 'harbor.mycompany.com/coredns/coredns:v1.8.4' was not found; unable to add it to cache
看起来它会创建错误的图像路径(harbor.mycompany.com/kube-proxy:v1.22.3
而不是harbor.mycompany.com/k8s.grc.io/kube-proxy:v1.22.3
例如)
那么,如何正确设置私有仓库或镜像来安装 Minikube?
我还尝试将所有需要的图像手动推送到harbor.mycompany.com。并使用
minikube start --image-repository harbor.mycompany.com/minikube --insecure-registry harbor.mycompany.com:443
这样我不会收到! The image was not found
消息,但会收到
[ERROR ImagePull]: failed to pull image: output: Error response from daemon: unauthorized: unauthorized to access repository
即使我将 .pem 文件复制到.minikube/certs