开发方式的变化(docker-compose 迁移到 minikube)

【开发方式的变化(docker-compose 迁移到 minikube)】使用 kompose 转义
下载安装 kompose:地址
开发方式的变化(docker-compose 迁移到 minikube)
文章图片

有各种各样的版本供你选择,总有一款适合你

注意:新版本的 kompose 砍掉了 up 和 down 两个子命令,以前很多关于 kompose 把 docker-compose 项目直接迁移到 k8s 平台的教程都没有办法使用了
具体情况参考:如何解决 unknown command "up" for "kompose"
输入 kompose convert
开发方式的变化(docker-compose 迁移到 minikube)
文章图片

使用
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 REPOSITORYTAGIMAGE IDCREATEDSIZE ponponon/test-nameko-for-rabbitmq1.0.1eb717d2bfbaa17 hours ago1.1GB nginxlatestc919045c4c2b11 days ago142MB registry.cn-hangzhou.aliyuncs.com/google_containers/kube-apiserverv1.23.1b6d7abedde392 months ago135MB registry.cn-hangzhou.aliyuncs.com/google_containers/kube-proxyv1.23.1b46c42588d512 months ago112MB registry.cn-hangzhou.aliyuncs.com/google_containers/kube-schedulerv1.23.171d575efe6282 months ago53.5MB registry.cn-hangzhou.aliyuncs.com/google_containers/kube-controller-managerv1.23.1f51846a4fd282 months ago125MB registry.cn-hangzhou.aliyuncs.com/google_containers/etcd3.5.1-025f8c7f3da614 months ago293MB registry.cn-hangzhou.aliyuncs.com/google_containers/corednsv1.8.6a4ca41631cc75 months ago46.8MB registry.cn-hangzhou.aliyuncs.com/google_containers/coredns/corednsv1.8.6a4ca41631cc75 months ago46.8MB registry.cn-hangzhou.aliyuncs.com/google_containers/pause3.66270bb605e126 months ago683kB registry.cn-hangzhou.aliyuncs.com/google_containers/kubernetesui/dashboardv2.3.1e1482a24335a8 months ago220MB registry.cn-hangzhou.aliyuncs.com/google_containers/dashboarde1482a24335a8 months ago220MB registry.cn-hangzhou.aliyuncs.com/google_containers/kubernetesui/metrics-scraperv1.0.77801cfc6d5c09 months ago34.4MB registry.cn-hangzhou.aliyuncs.com/google_containers/metrics-scraper7801cfc6d5c09 months ago34.4MB registry.cn-hangzhou.aliyuncs.com/google_containers/k8s-minikube/storage-provisionerv56e38f40d628d11 months ago31.5MB registry.cn-hangzhou.aliyuncs.com/google_containers/storage-provisionerv56e38f40d628d11 months ago31.5MB

    推荐阅读