关于docker:开发方式的变化dockercompose-迁移到-minikube

41次阅读

共计 2061 个字符,预计需要花费 6 分钟才能阅读完成。

应用 kompose 本义

下载安装 kompose:地址

有各种各样的版本供你抉择,总有一款适宜你

留神:新版本的 kompose 砍掉了 up 和 down 两个子命令,以前很多对于 kompose 把 docker-compose 我的项目间接迁徙到 k8s 平台的教程都没有方法应用了

具体情况参考:如何解决 unknown command “up” for “kompose”

输出 kompose convert

应用

kubectl apply -f authentication-service-deployment.yaml,http-api-service-deployment.yaml,add-service-deployment.yaml
kubectl apply -f add-service-service.yaml,authentication-service-service.yaml,http-api-service-service.yaml
kubectl get pods -A
minikube image load ponponon/test-nameko-for-rabbitmq:1.0.1
minikube ssh
docker@minikube:~$ docker image ls
REPOSITORY                                                                             TAG       IMAGE ID       CREATED         SIZE
ponponon/test-nameko-for-rabbitmq                                                      1.0.1     eb717d2bfbaa   17 hours ago    1.1GB
nginx                                                                                  latest    c919045c4c2b   11 days ago     142MB
registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserver                     v1.23.1   b6d7abedde39   2 months ago    135MB
registry.cn-hangzhou.aliyuncs.com/google_containers/kube-proxy                         v1.23.1   b46c42588d51   2 months ago    112MB
registry.cn-hangzhou.aliyuncs.com/google_containers/kube-scheduler                     v1.23.1   71d575efe628   2 months ago    53.5MB
registry.cn-hangzhou.aliyuncs.com/google_containers/kube-controller-manager            v1.23.1   f51846a4fd28   2 months ago    125MB
registry.cn-hangzhou.aliyuncs.com/google_containers/etcd                               3.5.1-0   25f8c7f3da61   4 months ago    293MB
registry.cn-hangzhou.aliyuncs.com/google_containers/coredns                            v1.8.6    a4ca41631cc7   5 months ago    46.8MB
registry.cn-hangzhou.aliyuncs.com/google_containers/coredns/coredns                    v1.8.6    a4ca41631cc7   5 months ago    46.8MB
registry.cn-hangzhou.aliyuncs.com/google_containers/pause                              3.6       6270bb605e12   6 months ago    683kB
registry.cn-hangzhou.aliyuncs.com/google_containers/kubernetesui/dashboard             v2.3.1    e1482a24335a   8 months ago    220MB
registry.cn-hangzhou.aliyuncs.com/google_containers/dashboard                          <none>    e1482a24335a   8 months ago    220MB
registry.cn-hangzhou.aliyuncs.com/google_containers/kubernetesui/metrics-scraper       v1.0.7    7801cfc6d5c0   9 months ago    34.4MB
registry.cn-hangzhou.aliyuncs.com/google_containers/metrics-scraper                    <none>    7801cfc6d5c0   9 months ago    34.4MB
registry.cn-hangzhou.aliyuncs.com/google_containers/k8s-minikube/storage-provisioner   v5        6e38f40d628d   11 months ago   31.5MB
registry.cn-hangzhou.aliyuncs.com/google_containers/storage-provisioner                v5        6e38f40d628d   11 months ago   31.5MB

正文完
 0