Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between kubernetes and GKE?

I know that GKE is driven by kubernetes underneath. But I don't seem to still get is that what part is taken care by GKE and what by k8s in the layering? The main purpose of both, as it appears to me is to manage containers in a cluster. Basically, I am looking for a simpler explanation with an example.

like image 634
soupybionics Avatar asked Jun 19 '16 06:06

soupybionics


People also ask

Is Gke same as Kubernetes?

Google Kubernetes Engine (GKE) is a management and orchestration system for Docker container and container clusters that run within Google's public cloud services. Google Kubernetes Engine is based on Kubernetes, Google's open source container management system.

What is difference between GCP and Kubernetes?

Google App Engine is a fully-managed service, where users don't have to worry about underlying infrastructure, and is easy to start. While Kubernetes Engine needs special expertise to manage production workload, and takes time to fully understand the concepts, but has greater scalability.

What is Gke used for?

Google Kubernetes Engine (GKE) provides a managed environment for deploying, managing, and scaling your containerized applications using Google infrastructure. The GKE environment consists of multiple machines (specifically, Compute Engine instances) grouped together to form a cluster.

Is Google cloud based on Kubernetes?

Google Cloud is the birthplace of Kubernetes—originally developed at Google and released as open source in 2014. Kubernetes builds on 15 years of running Google's containerized workloads and the valuable contributions from the open source community.


2 Answers

GKE is a managed/hosted Kubernetes (i.e. it is managed for you so you can concentrate on running your pods/containers applications)

Kubernetes does handle:

  • Running pods, scheduling them on nodes, guarantee no of replicas per Replication Controller settings (i.e. relaunch pods if they fail, relocate them if the node fails)
  • Services: proxy traffic to the right pod wherever it is located.
  • Jobs

In addition, there are several 'add-ons' to Kubernetes, some of which are part of what makes GKE:

  • DNS (you can't really live without it, even thought it's an add-on)
  • Metrics monitoring: with influxdb, grafana
  • Dashboard

None of these are out-of-the-box, although they are fairly easy to setup, but you need to maintain them. There is no real 'logging' add-on, but there are various projects to do this (using Logspout, logstash, elasticsearch etc...)

In short Kubernetes does the orchestration, the rest are services that would run on top of Kubernetes.

GKE brings you all these components out-of-the-box, and you don't have to maintain them. They're setup for you, and they're more 'integrated' with the Google portal.

One important thing that everyone needs is the LoadBalancer part: - Since Pods are ephemeral containers, that can be rescheduled anywhere and at any time, they are not static, so ingress traffic needs to be managed separately.

This can be done within Kubernetes by using a DaemonSet to fix a Pod on a specific node, and use a hostPort for that Pod to bind to the node's IP. Obviously this lacks fault tolerance, so you could use multiple and do DNS round robin load balancing.

GKE takes care of all this too with external Load Balancing. (On AWS, it's similar, with ALB taking care of load balancing in Kubernetes)

like image 115
MrE Avatar answered Oct 25 '22 18:10

MrE


GKE (Google Container Engine) is only container platform, which Kubernetes can manage. It is not a kubernetes-like with "differences".

As mentioned in "Docker and Kubernetes and AppC " (May 2015, that can change):

Docker is currently the only supported runtime in GKE (Google Container Engine) our commercial containers product, and in GAE (Google App Engine), our Platform-as-a-Service product.

You can see Kubernetes used on GKE in this example: "Spinning Up Your First Kubernetes Cluster on GKE" from Rimantas Mocevicius.

The gcloud API will still make kubernetes commands behind the scene.

https://deis.com/images/blog-images/first-kubernetes-cluster-gke-9.png

GKE will organize its platform through Kubernetes master

Every container cluster has a single master endpoint, which is managed by Container Engine.
The master provides a unified view into the cluster and, through its publicly-accessible endpoint, is the doorway for interacting with the cluster.

The managed master also runs the Kubernetes API server, which services REST requests, schedules pod creation and deletion on worker nodes, and synchronizes pod information (such as open ports and location) with service information.

like image 26
VonC Avatar answered Oct 25 '22 19:10

VonC