来自docker-compose.yaml的postgres服务在minikube中未显示为服务,而仅在pod中显示;也无法到达

时间:2019-05-27 21:40:05

标签: postgresql docker-compose minikube kompose

我正在使用以下简化版本的docker-compose.yaml文件:

@echo off  
Title watcher  
:start  
//if other .bat file is open then  
goto start  
Else //then when it is closed  
Del file.txt  
Exit  

当我执行version: '3' services: webapp: build: context: ../../../ dockerfile: config/docker/dev/Dockerfile-dev container_name: myWebApp-dev image: 'localhost:5000/webapp:1' labels: kompose.image-pull-policy: 'Never' ports: - "4000:4000" - "3000:3000" depends_on: - db networks: - esnet db: image: postgres:10 container_name: db environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres - POSTGRES_DB=webapp_dev networks: - esnet networks: esnet: 并将其部署到minikube集群时,可以看到数据库的pod正在运行,但是没有数据库服务。因此,无法从Web应用程序访问数据库并生成连接错误。我怎么了?

0 个答案:

没有答案