Is it possible to install Kubernetes manually in my existing GCP VM instance? [closed]

Solution 1:

As pointed by @Michael Hampton this topic could be extremly complex and there is no one straight and correct solution.

This answer is to give/set more a baseline and reference than the actual solution.


Dividing this question on parts:

Is it possible Kubernetes manually in my existing GCP VM instance?

In short, it's possible. There are a lot of options to choose from. Each solution will have it's advantages and disadvantages. It will also depend on the operating system your VM is deployed with.

Some of the options are the following:

  • Minikube
  • Kind
  • Kubeadm
  • Kubespray
  • Kops
  • Rancher <- as pointed by user @uav
  • Kelsey Hightower: Kubernetes the hard way

How to install Kubernetes manually in my existing GCP VM instance?

Each of the solutions linked above have a link to it's respective homepage. You can find there installation steps/tips. Each solution is different and I encourage you to check if selected option suits your needs.

A side note!

If you were to create a Kubernetes cluster on GCP with for example kubeadm please check if you have IPIPprotocol allowed in your network.


This question will inherently go into the differences between provider-managed and self-managed Kubernetes solutions.

The general idea behind it is that in a provider-managed solution (like GKE, AKS, EKS) some aspects of provisioning, management, updates, logging and monitoring, etc. are taken care of by your cloud provider. With a cluster provisioned on a GCE VM (not using GKE) you will have a self-managed solution.

You will need to take care of updates, provisioning and also you will need to tailor (which could be a good thing) your installation to your specific needs (and requirements).

There are articles talking about differences between provider-managed and self-managed solutions. They can give a general idea about the aspects that I mentioned:

  • Medium.com: SWLH: On premise Kubernetes clusters
  • Magalix.com: Blog: Provider-managed vs self-managed Kubernetes

To estimate the difference in costs of running:

  • GCE VM with a Kubernetes installed on top of it
  • GKE single zone cluster with a single node

You can use:

  • Cloud.google.com: Products: Calculator

I also encourage you to check the documentation about GKE pricing:

  • Cloud.google.com: Kubernetes Engine: Pricing

A note!

Additional fees may apply to other resources used in a project like static ip addresses, persistent disks used as PVC's etc.


Additional reference:

  • Kubernetes.io
  • Cloud.google.com: Kubernetes Engine: Docs: Quickstart