大网数据广告活动
服务器运维问答

Is it viable to run multiple containers on Google Compute Engine VM Instances running Container Optimized OS?

· 52CE 我爱测

Looking at the Google Compute Engine documentation it states that "You can only deploy one container for each VM instance." However, in the Getting started with Cloud Endpoints for Compute Engine with ESP tutorial it describes ru…

问题原文

原帖链接 · worldofchris · CC BY-SA 4.0

Looking at the Google Compute Engine documentation it states that "You can only deploy one container for each VM instance."

However, in the Getting started with Cloud Endpoints for Compute Engine with ESP tutorial it describes running two containers, one for the ESP and one for the API.

The tutorial documents doing this by hand so is not exactly a blueprint for production but it seems odd to me that this approach should be presented given the aforementioned limitation.

The fact that you can only specify one container in the gce-container-declaration means that to automate deploying multiple containers you'd need to use another approach.

Indeed elsewhere in the Container Optimized OS documentation it states:

"For advanced scenarios where you can deploy multiple containers and configure Docker options using cloud-init, you can create a Compute Engine instance with your choice of Container-Optimized OS image then proceed to configure it as needed."

Given this apparent inconsistency in the documentaion, is it viable to run multiple containers on GCE COS or should I be looking at other options such as Kubernetes?

已采纳解答

原帖链接 · Wojtek_B · CC BY-SA 4.0

It is possible to deploy multiple containers to Container Optimised OS but it's complicated procedure.

To quote again the documentation:

For advanced scenarios where you can deploy multiple containers and configure Docker options using cloud-init...

If you use console or deployment manager it's not possible to deploy more than one container, but if you create a config file and use cloud init you can deploy many containers to that instance.

I would recommend using GKE for that - it was designed specifically for that purpose and you can manage the containers in a much easier way.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-09-01)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。