一、阿里云镜像仓库配置
### --- 阿里云镜像仓库:
~~~ # 若是有harbor也是可以的,它俩原理是一样的
https://cr.console.aliyun.com/cn-beijing/instances/namespaces
二、测试阿里云镜像仓库是否可以使用
### --- 登录阿里云镜像仓库
~~~ 说明登录成功
~~~ 若是自建harbor把这个地址更改为harbor地址即可
[root@k8s-master01 ~]# docker login --username=yanqi_vip registry.cn-beijing.aliyuncs.com
Password:
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded
三、配置AccessKey:
### --- 配置AccessKey:
~~~ 动态获取阿里云镜像仓库的镜像版本号
~~~ 需要应用到阿里云客户端工具,若是使用harbor的话,直接使用curl即可
~~~ 头像——>AccessKey管理——>安全信息管理——>创建AccessKey:收集验证通过
~~~ ——>b保存AK信息——>查看AccessKey ID和AccessKey Secret——>END
四、安装阿里云客户端CLI