将镜像推送到阿里云docker库
- 网址
https://cr.console.aliyun.com/cn-hangzhou/new
- 打 tag
sudo docker tag user-image:v1.0 registry.cn-shanghai.aliyuncs.com/mengfanxiao/user-image:v1.0 sudo docker tag order-image:v1.0 registry.cn-shanghai.aliyuncs.com/mengfanxiao/order-image:v1.0
- 推送
sudo docker push registry.cn-shanghai.aliyuncs.com/mengfanxiao/user-image sudo docker push registry.cn-shanghai.aliyuncs.com/mengfanxiao/order-image
k8s部署2个docker
- 创建user.yaml
- 部署
kubectl apply -f user.yaml kubectl apply -f order.yaml
- 查看部署pods情况
kubectl get pods