0

I am a newbie in Kubernetes. I have hosted my microservice application on the GCP VM instance. I want to use Kubernetes for deploying, managing, and scaling my applications. GCP provides GKE for that, but if I don't want to use that and installing Kubernetes manually in my existing VM instance.

Is it possible and how to install Kubernetes manually in my existing GCP VM instance?

  • 2
    You follow the directions for installing Kubernetes. It is extremely complex, which is why Google has a simple Kubernetes product. – Michael Hampton Dec 17 '20 at 21:37
  • @MichaelHampton thanks for the reply, Yeah it is extremely complex, but if somehow I installed it then google charges for computing resources? My main concern here is how to reduce my cost that's why I think if I install manually then it became beneficial for me or simply use google provided Kubernetes product. – Bhargav Patel Dec 18 '20 at 10:06
  • 2
    @BhargavPatel `GKE` nodes are in fact `GCE` nodes and they are under the same pricing scheme. You can see it in the [GCP Pricing calculator](https://cloud.google.com/products/calculator). Please review this [Kubernetes Engine Pricing](https://cloud.google.com/kubernetes-engine/pricing) (additional fees). As for installing Kubernetes cluster on a `GCE` VM you can look on: [minikube](https://kubernetes.io/docs/tasks/tools/), [kubeadm](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/), [kubespray](https://github.com/kubernetes-sigs/kubespray). – Dawid Kruk Dec 18 '20 at 11:07
  • It is god damn simple with Rancher. Prove me wrong. – uav Dec 18 '20 at 17:23

1 Answers1

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:

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:


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:

I also encourage you to check the documentation about GKE 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:

Dawid Kruk
  • 638
  • 3
  • 11