![5cb59dc31c7b8c41aa876b201b4a28f6.png](https://i-blog.csdnimg.cn/blog_migrate/a624992172c63e00612e23a9de79af62.png)
部署springboot镜像到k8s
推送镜像到镜像仓库
这里使用的镜像仓库是阿里云仓库。镜像名称为
registry.cn-hangzhou.aliyuncs.com/gmg/hello:0.0.1
编写hello-rc.yaml
注意:生成secret,不然会出现镜像拉去失败
执行如下命令
$ kubectl create secret docker-registry regsecret
-n namespace
--docker-server=registry.cn-hangzhou.aliyuncs.com --docker-username=gmg0829 --docker-password=xxx --docker-email=xxx@163.com
其中:
- regsecret:指定密钥的键名称,可自行定义。
- n:指定namespace,如不指定则默认创建在default命名空间下。
- --docker-server:指定 Docker 仓库地址。
- --docker-username: 指定 Docker 仓库用户名。
- --docker-password&#