从业务视角分析Kubernetes的优缺点(Analyze the advantages and disadvantages of kubernetes from a business perspective)

  容器编排软件Kubernetes(” k8s”)是有史以来最重要的开源项目之一,并且近年来它的应用在持续增长。 自2022年开始在一家使用Kubernetes开发和扩展软件的公司工作之后,我看到我们的工程师经历了Kubernetes应用周期的各个阶段,从对这种技术可能带来的不懈热情,到解决集群和集群部署问题的无眠之夜。 如果您正处于此旅程的开始,或者只是考虑将Kubernetes用于您的云基础架构,那么这篇文章将有望帮助您评估Kubernetes的一些主要优缺点。

  我将以一个业务为中心的角度来讨论该主题,并且由于涉及技术比较和细节的各种文章已经存在,我将不涉及任何技术细节。

  Kubernetes的优势1.使用Kubernetes及其庞大的生态系统可以提高您的生产力

  如果在您的工程工作流程中正确实施Kubernetes,则可以极大地提高生产率。 尤其是巨大的Kubernetes生态系统,可以最好地与CNCF Landscape结合使用,有助于更轻松有效地使用Kubernetes,从而减少其总体复杂性的负面影响。 通过依靠一些专门用于云原生软件的现有工具,您可以获得几乎无法自行构建的解决方案。

  例如:我们公司最近在CNCF中添加了开源开发工具DevSpace,它使您可以为团队中的每个开发人员设置和标准化部署和测试工作流程。 其他工具(例如Drone)使您可以快速为Kubernetes创建CI / CD管道,而Prometheus等工具使监视比以往任何时候都容易。 生态系统中可用的大量工具可大大缩短发布周期,使工程流程专业化,并最终改善从开发到生产的软件质量。 当然,大量的技术选择还可以帮助您完全自定义所有需求。 另外,k8s生态系统中的大多数工具都是开源的,因此可以免费使用。

  2. Kubernetes和云原生技术堆栈吸引人才

  许多软件工程师希望在使用现代有趣技术的公司中工作。 在2022年Stack Overflow开发者调查中,Kubernetes绝对是第三大最受欢迎的平台之一。结合高效的工作流和其他云原生工具,您的技术堆栈和流程将对潜在申请人非常有吸引力。 同样对于您当前的员工来说,使用新的东西可能会非常有动力,这可以提高开发团队的总体满意度,从长远来看甚至可以减少员工流失。 Kubernetes的这种优势通常被忽略,但是鉴于技术人才的短缺,它可以为您的组织带来物质利益。

  3. Kubernetes是面向未来的解决方案

  如果您决定使用Kubernetes,您可以确定该解决方案可以使用很多年,原因如下:

  所有主要的云供应商都在支持Kubernetes,为其提供开箱即用的解决方案。在采用率方面,云供应商及其生态系统的支持方面,替代的容器编排解决方案远远落后于k8。 甚至以前专注于竞争技术的公司现在也认可Kubernetes:Docker提供的是Docker Kubernetes服务,而不仅仅是Docker Swarm解决方案,Mesosphere更名为D2IQ,以便对Kubernetes更加开放,而不仅仅是专注于Apache Mesos。当然,Kubernetes生态系统正以令人难以置信的速度快速增长,并且每天都会发布支持Kubernetes平台之上的各种需求的新产品。

  从个人的角度来看,Kubernetes也代表着未来:如果您希望用户群可以扩大到庞大的受众,那么可以肯定的是Kubernetes可以处理它,因为它旨在支持大型分布式系统,并且最初由Google工程师开发,以他们在构建Borg等可扩展平台方面的经验作为后盾。 如果您的应用程序本身不断增长并变得更加复杂,情况也是如此。 在这里,微服务架构经常发挥作用,对于这些而言,Kubernetes显然是当今的首选技术。 最后,如果您出于某种原因想要更换云供应商,例如 从Amazon Web Services(AWS)到Microsoft Azure,您可以轻松地从其他提供商那里找到非常相似的Kubernetes服务,而Kubernetes本身进行的切换相对无缝,从而避免了供应商锁定。

  4. Kubernetes帮助使您的应用程序运行更稳定

  如果您需要确保您的应用程序已启动并且运行非常可靠,Kubernetes可以为您提供支持。 例如,它允许您进行滚动更新以升级软件,而无需停机。 可以通过支持高可用性应用程序的方式来设置Kubernetes,并且如果您使用的是主要供应商的公共云服务,则可以肯定地保证了正常运行时间。 (但是,其他技术和基础架构当然也可以实现,但通常需要付出更多的努力。)

  5. Kubernetes可能比其替代品便宜

  k8的另一个优点是它有时可能比其他解决方案便宜(取决于您的应用程序)。 由于平台本身具有一些通用的计算需求,因此对于非常小的应用程序而言,它通常会更加昂贵。 但是,计算资源需求越大,这些基本基础结构需求对于总体成本计算的重要性就越小。 在这种情况下,其他因素变得更加重要。 例如,Kubernetes能够根据应用程序的需求以及应用程序处理的传入流量和负载来自动扩展。 这意味着Kubernetes可以在高峰时段扩展您的应用程序及其所需的资源,还可以在一年,一周甚至一天的几小时的繁忙时段缩减您的基础架构。 这意味着如果没有太多事情发生,您只需支付较少的费用。 总体而言,这会导致高利用率,并阻止您为不需要的资源付费。

  相对较新的”无节点Kubernetes”概念以及诸如Virtual Kubelet或elotl之类的解决方案,为节省基础架构成本提供了更多潜力。

  总的来说,Kubernetes在某些情况下可以更便宜,而在另一些情况下则更昂贵,并且总有降低其运行成本的潜力。 为此,您需要针对特定的应用程序对其进行评估,并比较不同提供商的需求(但是,对于云提供商的选择,通常除了成本之外,还有更多因素会起作用)。

  尽管所有这些优点听起来都很吸引人,但并不是每个公司都在使用Kubernetes,并且对Kubernetes做出决定可能是对其缺点进行评估的结果。 接下来,让我们看一下Kubernetes对企业的一些主要缺点。

  Kubernetes的缺点1. Kubernetes对于简单的应用程序可能是一个过大的杀伤力

  Kubernetes是一项复杂而强大的技术,可让您相当高效地在云环境中大规模运行软件。 但是,如果您不打算为庞大或分散的受众群体开发复杂的产品(例如,您不是在建立具有数千名客户的全球在线商店)或具有高计算资源需求(例如,机器学习应用程序), k8s的技术力量给您带来的好处并不多。 假设您只想建立一个显示营业时间和营业地点的网站。 然后,您不应该使用Kubernetes,因为这不是它的目的。 但是,人们通常不能说每种机器学习软件都应该与Kubernetes一起运行,并且没有简单的网站应该如此。 第一种情况比另一种情况更有可能受益。

  2. Kubernetes非常复杂,会降低生产率

  Kubernetes以其复杂性而闻名。 尤其是对于不熟悉基础结构技术的开发人员,可能很难与之合作。 但是,如果您想实践DevOps方法,则开发人员需要在开发生命周期中尽早访问并部署到Kubernetes,以便他们可以快速,尽早地测试其代码,以防止在生产后期出现代价高昂的错误。 即使有明显的趋势使Kubernetes更容易访问(例如,DevSpace致力于成为开发人员最简单,最快的Kubernetes工具),但仍然建议每个工程团队至少聘请一位具有深刻理解的Kubernetes专家,这仍然是相对昂贵的-具有k8s技能的人在美国的平均工资超过14万美元,或者接受培训,这将需要一段时间。

  无论如何,您的开发团队将不得不调整其某些流程以使其真正成为云原生。 至少在短期内,这可能导致生产率降低和更长的发布周期。 (但是,如果正确的话,从长远来看,k8s还可以提高您的生产率)

  3.过渡到Kubernetes可能很麻烦

  由于大多数公司无法在绿色领域中起步,因此需要对您现有的软件进行调整以使其能够与Kubernetes顺利运行,或者至少与将在Kubernetes上运行的新建应用程序一起平稳运行。 很难估计这需要多少工作量,因为这在很大程度上取决于软件(例如,是否已将其容器化,使用了哪种编程语言,等等)。 此外,某些流程需要适应新环境,尤其是部署流程。 即使有经验丰富的现场人员,采用Kubernetes仍可能是一个挑战,需要大量的精力和时间。

  4. Kubernetes可能比其替代品更昂贵

  我已经描述过,Kubernetes可能比使用替代技术便宜。 但是,它也可能更昂贵。 这是因为前面提到的所有缺点都浪费了您的工程师的时间,而这些时间没有花在创建新的”有形”业务价值上。

  如果您的工程师花时间让现有的,正在运行的应用程序在Kubernetes中运行,则他们的目标是使用另一种技术来维持现状。

  而且,如果他们达到了这个目标,则该应用程序的用户将不会立即看到此迁移的任何好处(但是,可能会有一些细微的好处,例如提高的稳定性)。 由于工程时间是非常宝贵的资源,因此在决定采用Kubernetes时应考虑这一点。

  除了这种间接成本,有时运行Kubernetes的基础架构成本仅比替代基础架构高,尤其是对于小型应用程序,因为Kubernetes本身具有一些计算需求。 同样,以简单网站的简化示例为例,选择一个更简单的基础架构(例如单个VM或托管平台,例如Heroku或Netlify)可能会更便宜。

  结论

  是否采用Kubernetes是您的选择,这没有简单的答案。 这取决于您的特定需求和优先级,这里甚至没有提到许多技术原因。 如果您是从一个新项目开始,或者您打算在一家规模不超过一个快速MVP的初创公司中工作,或者需要升级旧版应用程序,那么Kubernetes可能是一个不错的选择,因为它可以为您提供很多灵活性,功能和可扩展性。 但是,由于必须掌握新技能并且必须在开发团队中建立新的工作流程,因此始终需要投入时间。

  但是,如果做对了,由于服务质量更好,生产力更高,员工动力更强,因此花时间学习和采用Kubernetes通常会在将来获得回报。

  无论如何,您都应该做出明智的决定,并且有很多充分的理由选择或放弃Kubernetes。 希望这篇文章能帮助您进一步为您做出正确的决定。

————————

Container choreography software kubernetes (“k8s”) is one of the most important open source projects in history, and its application has continued to grow in recent years. Since working in a company using kubernetes to develop and expand Software in 2022, I have seen our engineers go through all stages of kubernetes application cycle, from the unremitting enthusiasm for this technology to the sleepless night of solving cluster and cluster deployment problems. If you are at the beginning of this journey, or just considering using kubernetes for your cloud infrastructure, this article is expected to help you assess some of the main advantages and disadvantages of kubernetes.

I will discuss this topic from a business centric perspective, and since various articles involving technical comparisons and details already exist, I will not cover any technical details.

Kubernetes advantages 1 Using kubernetes and its huge ecosystem can improve your productivity

If kubernetes is properly implemented in your engineering workflow, productivity can be greatly improved. In particular, the huge kubernetes ecosystem can be best used in combination with CNCF landscape, which helps to use kubernetes more easily and effectively, so as to reduce the negative impact of its overall complexity. By relying on existing tools dedicated to cloud native software, you can get solutions that you can hardly build yourself.

For example, our company recently added the open source development tool devspace to CNCF, which enables you to set up and standardize the deployment and testing workflow for each developer in the team. Other tools, such as drone, allow you to quickly create CI / CD pipes for kubernetes, while tools such as Prometheus make monitoring easier than ever. A large number of tools available in the ecosystem can greatly shorten the release cycle, professionalize the engineering process, and finally improve the software quality from development to production. Of course, a large number of technology choices can also help you completely customize all requirements. In addition, most of the tools in the k8s ecosystem are open source and can be used for free.

2. Kubernetes and cloud native technology stack attract talents

Many software engineers want to work in companies that use modern and interesting technologies. In the 2022 stack overflow developer survey, kubernetes is definitely one of the third most popular platforms. Combined with efficient workflow and other cloud native tools, your technology stack and processes will be very attractive to potential applicants. Similarly, for your current employees, using new things may be very motivated, which can improve the overall satisfaction of the development team and even reduce employee turnover in the long run. This advantage of kubernetes is often overlooked, but given the shortage of technical talents, it can bring material benefits to your organization.

3. Kubernetes is a future oriented solution

If you decide to use kubernetes, you can determine that the solution can be used for many years for the following reasons:

All major cloud vendors are supporting kubernetes and providing out of the box solutions. In terms of adoption rate and support of cloud providers and their ecosystems, alternative container orchestration solutions lag far behind K8. Even companies that used to focus on competitive technologies now recognize kubernetes: docker provides docker kubernetes services, not just docker swarm solutions. Mesosphere is renamed d2iq to be more open to kubernetes, not just Apache mesos. Of course, the kubernetes ecosystem is growing at an incredible rate, and new products supporting various needs on the kubernetes platform are released every day.

From a personal point of view, kubernetes also represents the future: if you want to expand the user base to a large audience, it is certain that kubernetes can deal with it, because it is designed to support large distributed systems and was originally developed by Google engineers, backed by their experience in building scalable platforms such as Borg. The same is true if your application itself grows and becomes more complex. Here, microservice architecture often plays a role. For these, kubernetes is obviously the preferred technology today. Finally, if you want to change the cloud provider for some reason, such as from Amazon Web services (AWS) to Microsoft azure, you can easily find very similar kubernetes services from other providers, and the switching of kubernetes itself is relatively seamless, thus avoiding vendor locking.

4. Kubernetes helps make your applications run more stably

If you need to make sure your application is up and running reliably, kubernetes can support you. For example, it allows you to make rolling updates to upgrade software without downtime. Kubernetes can be set up by supporting high availability applications, and if you are using public cloud services from major suppliers, you can certainly ensure uptime. (however, other technologies and infrastructure can certainly be implemented, but usually more effort is needed.)

5. Kubernetes may be cheaper than its alternatives

Another advantage of K8 is that it can sometimes be cheaper than other solutions (depending on your application). Because the platform itself has some general computing requirements, it is usually more expensive for very small applications. However, the greater the demand for computing resources, the less important these basic infrastructure requirements are to the overall cost calculation. In this case, other factors become more important. For example, kubernetes can scale automatically according to the needs of the application and the incoming traffic and load handled by the application. This means that kubernetes can expand your application and the resources it needs during peak hours, and shrink your infrastructure during peak hours of the year, week, or even day. This means that if not much happens, you only have to pay less. Overall, this leads to high utilization and prevents you from paying for unnecessary resources.

The relatively new concept of “nodeless kubernetes” and solutions such as virtual kubelet or elotl offer more potential to save infrastructure costs.

In general, kubernetes can be cheaper in some cases and more expensive in others, and there is always the potential to reduce its operating costs. To do this, you need to evaluate specific applications and compare the needs of different providers (however, there are usually more factors in the selection of cloud providers than costs).

Although all these advantages sound attractive, not every company is using kubernetes, and the decision on kubernetes may be the result of an evaluation of its shortcomings. Next, let’s take a look at some of the main shortcomings of kubernetes for the enterprise.

Disadvantages of kubernetes 1 Kubernetes can be too lethal for simple applications

Kubernetes is a complex and powerful technology that allows you to run software on a large scale in a cloud environment quite efficiently. However, if you are not going to develop complex products for a large or dispersed audience (for example, you are not building a global online store with thousands of customers) or have high demand for computing resources (for example, machine learning applications), k8s’s technical power will not bring you much benefit. Suppose you just want to build a website that displays business hours and places of business. Then, you shouldn’t use kubernetes because that’s not its purpose. However, people usually can’t say that every machine learning software should run with kubernetes, and no simple website should. The first case is more likely to benefit than the other.

2. Kubernetes is very complex and will reduce productivity

Kubernetes is famous for its complexity. Especially for developers who are not familiar with infrastructure technology, it may be difficult to cooperate with them. However, if you want to practice the Devops approach, developers need to access and deploy to kubernetes early in the development life cycle so that they can test their code quickly and early to prevent costly errors later in production. Even if there is a clear trend to make kubernetes more accessible (for example, devspace is committed to becoming the simplest and fastest kubernetes tool for developers), it is still recommended that each engineering team hire at least one kubernetes expert with deep understanding, which is still relatively expensive – the average salary of people with k8s skills in the United States exceeds $140000, or receive training, This will take some time.

In any case, your development team will have to adjust some of its processes to make it truly cloud native. At least in the short term, this may lead to lower productivity and longer release cycles. (however, if correct, k8s it can also increase your productivity in the long run)

3. The transition to kubernetes can be cumbersome

Since most companies cannot start in the green space, you need to adjust your existing software to run smoothly with kubernetes, or at least with the new applications that will run on kubernetes. It is difficult to estimate how much work this requires, as it depends largely on the software (for example, whether it has been containerized, which programming language is used, etc.). In addition, some processes need to adapt to the new environment, especially the deployment process. Even with experienced field personnel, adopting kubernetes can be a challenge that requires a lot of energy and time.

4. Kubernetes may be more expensive than its alternatives

As I have described, kubernetes may be cheaper than using alternative technologies. However, it may also be more expensive. This is because all the shortcomings mentioned above waste your engineer’s time, which is not spent creating new “tangible” business value.

If your engineers take the time to run existing, running applications in kubernetes, their goal is to use another technology to maintain the status quo.

Moreover, if they achieve this goal, users of the application will not immediately see any benefits of this migration (however, there may be some subtle benefits, such as improved stability). Since engineering time is a very valuable resource, this should be taken into account when deciding to adopt kubernetes.

In addition to this indirect cost, sometimes the infrastructure running kubernetes is only more expensive than the alternative infrastructure, especially for small applications, because kubernetes itself has some computing requirements. Similarly, taking a simplified example of a simple website as an example, it may be cheaper to choose a simpler infrastructure, such as a single VM or managed platform, such as heroku or netlify.

Conclusion

Whether to adopt kubernetes is your choice. There is no simple answer. It depends on your specific needs and priorities, and many technical reasons are not even mentioned here. If you start with a new project, or you plan to work in a startup with no more than one fast MVP, or you need to upgrade old applications, kubernetes may be a good choice because it can provide you with a lot of flexibility, functionality and scalability. However, because new skills must be mastered and new workflows must be established in the development team, time must always be invested.

However, if you do it right, due to better service quality, higher productivity and stronger employee motivation, taking time to learn and adopt kubernetes will usually pay off in the future.

In any case, you should make a wise decision, and there are many good reasons to choose or give up kubernetes. I hope this article can help you further make the right decision for you.