修改registry地址_Kubernetes(minikube) 私有 registry 使用详解
时间: 2024-03-02 14:49:35 浏览: 220
好的,关于修改 Kubernetes(minikube) 私有 registry 地址,可以按照以下步骤进行:
1. 首先,需要在本地启动一个私有 registry。可以使用 Docker 官方提供的 registry 镜像,命令如下:
```
docker run -d -p 5000:5000 --restart=always --name registry registry:2
```
这个命令会启动一个名为 registry 的容器,它会将本地的 5000 端口映射到容器内部的 5000 端口,并且在容器启动时自动重启。
2. 接下来,需要将 Kubernetes(minikube) 集群的节点配置为使用私有 registry。可以通过以下命令来配置:
```
minikube ssh "sudo sh -c 'echo \"--insecure-registry <your-registry>:<port>\" >> /etc/docker/daemon.json && systemctl restart docker'"
```
其中,`<your-registry>` 是私有 registry 的地址,`<port>` 是私有 registry 的端口号。
3. 最后,需要将私有 registry 的地址添加到 Kubernetes(minikube) 集群的 Docker 镜像列表中。可以使用以下命令来添加:
```
minikube ssh "sudo sh -c 'echo \"--insecure-registry <your-registry>:<port>\" >> /etc/systemd/system/docker.service.d/http-proxy.conf && systemctl daemon-reload && systemctl restart docker'"
```
同样,`<your-registry>` 是私有 registry 的地址,`<port>` 是私有 registry 的端口号。
完成以上步骤后,就可以在 Kubernetes(minikube) 集群中使用私有 registry 了。
阅读全文
相关推荐
![-](https://img-home.csdnimg.cn/images/20241231044930.png)
![-](https://img-home.csdnimg.cn/images/20241231044930.png)
![-](https://img-home.csdnimg.cn/images/20241231044937.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![-](https://img-home.csdnimg.cn/images/20241231044930.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![-](https://img-home.csdnimg.cn/images/20241231044901.png)
![-](https://img-home.csdnimg.cn/images/20241231044901.png)
![-](https://img-home.csdnimg.cn/images/20241231044930.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![-](https://img-home.csdnimg.cn/images/20241226111658.png)
![zip](https://img-home.csdnimg.cn/images/20241231045053.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)