简体   繁体   English

可以在本地构建和运行映像。 无法通过Google Kubernetes Engine(GKE)构建和运行映像

[英]Can build and run image locally. Cannot build and run image via Google Kubernetes Engine (GKE)

From my application's root directory, I can build an image and run it locally. 从应用程序的根目录,我可以构建映像并在本地运行。 When I use the image built via the kubernetes engine, it successfully builds, but the application errors. 当我使用通过kubernetes引擎构建的映像时,它可以成功构建,但是应用程序出错。 错误日志的图像

The logs above are from kubernete's dashboard, they show the error that occurs when trying to run the application. 上面的日志来自kubernete的仪表板,它们显示了尝试运行应用程序时发生的错误。

I've also changed my local environment to the node/npm version to match the version noted in the logs and the app. 我还将本地环境更改为node / npm版本,以匹配日志和应用程序中注明的版本。 The app runs with no issues locally. 该应用程序在本地运行没有任何问题。

I've only found one other user with a similar issue: https://github.com/GoogleCloudPlatform/cloud-builders/issues/142 so I'm pretty stumped as to what it could be, any suggestions are welcome. 我只发现了另一个有类似问题的用户: https : //github.com/GoogleCloudPlatform/cloud-builders/issues/142,所以我对可能的问题感到很困惑,欢迎提出任何建议。

  1. Did you try to use this tool to see the images differences? 您是否尝试过使用此工具查看图像差异? https://github.com/GoogleCloudPlatform/container-diff https://github.com/GoogleCloudPlatform/container-diff
  2. Did you try to deploy your local image to GKE to check it is actually working? 您是否尝试将本地映像部署到GKE以检查其是否正常工作?

Also, you should probably try to catch the gulp error in order to understand better what's going wrong. 另外,您可能应该尝试捕获gulp错误,以便更好地了解出了什么问题。 https://medium.com/@boriscoder/catching-errors-on-gulp-js-4682eee2669f https://medium.com/@boriscoder/catching-errors-on-gulp-js-4682eee2669f

Cheers, Philmod 干杯,菲尔莫德

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Google App Engine Standard Node JS 如何运行构建脚本? - Google App Engine Standard Node JS how to run build script? 无法建立docker映像 - cannot build docker image Reactjs 应用程序构建以在本地自动运行 - Reactjs application build to auto run locally 无法运行 npm run build 或 npm start - Cannot run npm run build or npm start 无法在本地安装gulp。 当我在cmd中运行“npm install gulp --save-dev”命令时,它失败了 - Can't install gulp locally. when I run “npm install gulp --save-dev” command in cmd it's fails 如何构建 docker 以从 Google App Engine 中的 Node.js child_process 运行 Python3? - How to build docker to run Python3 from Node.js child_process in Google App Engine? Vercel 部署错误:Module Not Found 远程在本地工作。 缓存构建是问题吗? - Vercel deployment error: Module Not Found remotelly works locally. Cached build is the problem? “npm run build”在 AWS CodeBuild 中失败但在本地成功 - 'npm run build' failed in AWS CodeBuild but succeeded locally npm run build 无法在本地主机中访问 - npm run build cannot access in localhost 无法通过Visual Studio Code在本地运行Azure持久功能 - Cannot run Azure Durable Function locally via Visual Studio Code
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM