Search code examples
dockergoogle-cloud-platformgoogle-kubernetes-enginegoogle-container-registry

Google cloud container engine vs normal vm


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


Solution

  • 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.