Google cloud container engine vs normal vm

5/25/2016

Short question about the container engine: why should I use it rather than just handle my docker containers in a normal VM (in compute engine)? Could save a little money, this way...

Regards, Marc

-- Marc Borni
docker
google-cloud-platform
google-container-registry
google-kubernetes-engine

2 Answers

5/25/2016

At a small scale, running containers in normal VMs is fine. Google even offers a container optimized image that makes this really easy. And it's definitely less expensive than running a Kubernetes cluster (either in Google Container Engine or yourself).

What's really powerful about Kubernetes / GKE is the cluster management API. It allows you to introspect all of the containers running on your compute, either using a CLI/UI or by other programs. With a normal VM, to find out all of the containers that you are running you'd either need to repeatedly ssh into each of your VMs and run docker ps or specifically build your containers to "phone home" to a central container version authority (which won't be possible if you want to use off-the-shelf containers). With Kubernetes, you can say kubectl get pods and with a single command know everything that you are running. You can use constructs built for application management like Deployments (or kubectl rolling-update) to push new versions of your containers without restarting any VMs. And you get cluster-wide logging and monitoring for your containers as well.

-- Robert Bailey
Source: StackOverflow

5/25/2016

This is a general issue of using your own infrastructure, or a pay-for-service approach. This is probably best explained by economy (do you have memory upfront for a big investment in own hardware to create VM on?)

But there are technical issues as well: with a paid service you are free from issues of providing power, or connectivity, or hardware maintenance, or lower-level management, or... Of course this also means that you can not influence how (quick, expensive, fitting to your needs, etc) these issues are solved by your provider.

In short: with VM you have more freedom, but also more work and possibly higher upfront costs (also cost of your own labor, so it takes more time to start the essential part of your project). With paid service the total financial costs may be higher, but costs are spread in time. You have less freedom about the platform, but this also means you can concentrate on higher-level issues related to your specific application - and you can start thinking about them sooner.

You could also consider BOTH - to have e.g. additional computing capacity for disaster-recovery, or testing, or backup.

-- Artur Opalinski
Source: StackOverflow