本文介绍了kubernetes和GKE有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道GKE由下面的kubernetes驱动.但是我似乎还不明白,GKE负责哪一部分,而k8s负责哪一部分?在我看来,两者的主要目的是管理集群中的容器.基本上,我正在寻找一个示例的更简单解释.

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.

推荐答案

GKE是托管/托管的Kubernetes(即由您托管),因此您可以专注于运行pod/容器应用程序

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

Kubernetes确实可以处理:

Kubernetes does handle:

  • 运行pod并在节点上进行调度,以确保每个Replication Controller设置都没有副本(即,如果pod失败,则重新启动pod,如果节点失败,则将其重新定位)
  • 服务:将流量代理到正确的Pod,无论其位于何处.
  • 工作

此外,Kubernetes有多个附加组件",其中一些是GKE的组成部分:

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

  • DNS(如果没有它,您将无法生存,甚至认为它是附加组件)
  • 指标监控:使用influxdb,grafana
  • 仪表板

尽管它们相当容易设置,但是它们都不是即用的,但是您需要对其进行维护.没有真正的日志记录"附加组件,但是有很多项目可以做到这一点(使用Logspout,logstash,elasticsearch等)

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

简而言之,Kubernetes做业务流程,其余的是将在Kubernetes之上运行的服务.

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

GKE为您带来了所有这些现成的组件,您无需维护它们.它们是为您设置的,并且与Google门户更加集成".

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.

每个人需要的重要一件事是LoadBalancer部分:-由于Pod是临时容器,可以随时随地重新安排时间,因此它们不是静态的,因此需要分别管理入口流量.

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.

这可以在Kubernetes中完成,方法是使用DaemonSet将Pod固定在特定节点上,并使用hostPort将该Pod绑定到节点的IP.显然,这缺乏容错能力,因此您可以使用多个DNS循环负载平衡.

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也通过外部负载平衡来解决所有这些问题.(在AWS上类似,ALB负责Kubernetes中的负载平衡)

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)

这篇关于kubernetes和GKE有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 03:47