original text ：Will Kubernetes Collapse Under the Weight of Its Complexity?
translator ： Director of the , be doomed _, kevinlinkai
A few weeks ago , Join me KubeCon EU And give a speech . This is about 4,700 A large event attended by people . That reminds me 2014 year 11 In Paris in September OpenStack Summit . The campaign is equally powerful , There are many manufacturers in it to promote , There are also many large-scale meetings , Most of the participants were programmers . However , I think there are potential problems in this activity ： Almost everyone I communicate with is the same operation and maintenance personnel or SRE The engineer . Where are a lot of the advertised app developers ？ Shouldn't those complex infrastructures serve these developers ？Kubernetes Is the community really paying attention to the needs of users ？ So I couldn't help thinking ：Kubernetes Is it too complicated ？ Will it be crushed by its own complexity ？ Will be like OpenStack Same from 2014 Has it been declining since ？
ok , I admit that I'm a little over thinking about this idea , I should say in the end I don't think it will be like this . Kubernetes have OpenStack Some of the advantages you've never had . First , It's already more scalable , So it can actually realize the dream of large-scale cluster scheduling in the environment of thousands of servers . secondly , All three major cloud providers have launched hosting Kubernetes Our service products . In just four years ,Kubernetes It has become the de facto standard in the field of cloud computing and infrastructure . However , Its complexity is still an important issue for users .
Most developers don't face Google On this scale
Development Kubernetes The main purpose is to solve similar problems Google The complexity and problems of this scale . We want the infrastructure to be self-healing 、 Horizontally scalable and declarative configuration （ Infrastructure is code ） The function of . however , Most applications and application developers don't have this problem . Most applications are at scale （ Project size and user group size ） It's much smaller , Or they are still in the early stages of exploring the product market .
For applications that don't have scale problems at all , They don't usually need to increase self-healing 、 The complexity of horizontally scalable systems . It might be better to consider using a single database and application server that can handle the load . If in 99.5% In the time of , It's available , And provide appropriate alarm system for operation and maintenance personnel , This is great for many applications and workloads . by comparison , The complexity of building a distributed system and the delay of online time are not worth the trouble and investment .
For new applications , Their biggest risk is not finding the right product / market . in other words , They're deployed , But never used . Their code will eventually be discarded , Because it's not what people really want . This also represents the situation faced by the vast majority of application code written by developers . In my career , I spend most of my time iterating code and functionality , And try to find the right application feature set . Once found , We can extend it , But it's premature to do this before .
I am here Kubernetes The observed problem is , It requires too much cognitive load in the early stages of the project . There are too many things you need to start and think about , This is the obstacle to starting the project and iterating it quickly . Early in the project , Function development speed and iteration speed are the most important factors . In my submission Heroku Models are ideal development models —— You can use hosted Postgres database , At the same time through git push To get the deployed new code and provide external services . There's little to think about . It may not scale indefinitely , And it can become very expensive , But before the application reaches a large scale , We don't need to worry about these things .
Simply speaking ,Kubernetes Make simple things more complicated , And make it possible to solve complex things . If Kubernetes To really succeed , It needs to make the early stages of the project easier , And reduce the cognitive burden of application developers . If we can make it possible for developers to learn about Kubernetes Inside and outside and all sorts of intricate details , And no problem , That's good . As the scale grows , Everything will become very complicated and difficult . But as a successful development platform , If not necessary , There's no need to put decision-making pressure on developers .Ruby on Rails The father of David Heinemeier Hansson(DHH) In his RailsConf 2018 The keynote address is called “JIT Study ”.
Speaking of DHH, I want to use it here Rails As an example . The first thing I want to explore is ： Why? Rails So successful at the time ？ It's not because Ruby Popular （ It was just an unknown programming language from Japan ）, It's not because Rails and Ruby Provides the fastest speed in dynamic web pages , It's because they greatly improve the development efficiency of developers . When DHH I'd like to introduce you to 15 When building a blog in minutes , This has greatly aroused Java and .Net Developer's attention , Because it usually takes them weeks or even months to achieve the same requirements . Developers choose Rails Because they can quickly release new features to users , That's exactly what all these frameworks and infrastructures really mean .
Rails One of the best things to do is , It generates an app for you shell, And help you generate scaffolding and other parts of the project . This allows developers not to have to make a lot of decisions at the beginning of the project , For example, consider how to organize application code 、 Where should the database model be placed 、 Resource pipeline (asset pipeline) How to define 、 How to migrate the database , And many other tasks and decisions .
In my submission Kubernetes You can benefit a lot from this kind of generator . Now there are generators for specific resources , But it's far from meeting the demand . If you can provide templates for different types of applications , That's even better , Even the most common templates . relational database 、 Application layer 、 Cache server , The combination of message queues and work pools may occupy the majority of the time to build an application 90% Even more . This simple structure can extend to incredible requests and complexity . Create out of the box templates or generators , as well as Kubernetes The organization of resources and code , Will be very useful .
Scaffolding generator for common elements is very good . You need one MySQL database ？ Use a command like this ：
To create a state set 、 Services and everything else that's necessary . then , Just one command to put scaffolding in your k8s Environmental Science , Then you can use a few more console commands to have a production environment ready database . Can be a popular application framework 、 Message agents and anything we can think of are created in a similar way .
Maybe the operators and Helm A combination of charts can do this , But I don't think it's good enough . Of course , except Kubernetes outside , We force developers to understand two additional tools . Even if it's just to increase understanding of technical terms and install new command line tools , They also need extra effort and thinking . The positioning of these things should be “ First citizen ”, And is Kubernetes Part of the out of the box experience , You can go directly through kubectl To visit .
CNCF The scope of the project is growing
about Kubernetes Come on ,CNCF It's not a special problem that there are more and more projects in , but CNCF The territory of the project is huge , This makes KubeCon/CNCF The meeting was extremely fragmented . Often during a conference, it includes 14 A theme . For developers , How to know what tools your project needs ？ Let's see Cloud Native This huge pattern .
Cloud Native Landscape. Image source: https://twitter.com/dankohn1/status/989956137603747840
It's impossible to understand all of these items in the diagram . But if you provide a path to get a set of preset tools , Application developers should have a better service experience . If they want to add different tools to it , That's fine , But at least developers should not be allowed to think about these issues in advance . CNCF Increasing complexity and wider coverage may weaken Kubernetes As the focus and brand of building the platform . I'm not sure what the end result might be , Or am I exaggerating , But from my point of view at the meeting , It's like a hodgepodge of tools (tool porn). When we spend our entire career learning and building new tools for infrastructure , How to solve user problems ？
What I want to emphasize is ： Infrastructure is a tool to help application developers solve users' practical problems . It should optimize developer efficiency and delivery capabilities . An open platform that can do this has a chance to win .
At some point , Developers need to learn more about infrastructure tools . Most of them are in AWS Working developers are familiar with some of the components in the cloud , It's like GCP or Azure It's the same with developers on the Internet who are familiar with these components . take Kubernetes As a foundation layer, it may be more promising , Because developers can learn this paradigm , It can bring its technology and framework to any public or private cloud .
This portability is our choice Kubernetes As a new version under development 2.0 The reason for the infrastructure layer architecture of cloud products . But the learning curve is right there , So our development team is gradually increasing staff . So , I made the reading materials for the whole development team Kubernetes: Up and Running.
I hope Kubernetes There is a gentle learning curve ,Kubernetes To be successful as an ecosystem, you need to meet the real needs of application developers . After all, infrastructure is a support tool , Used to solve customer problems embodied in user oriented application code . Improving the efficiency of application developers is the best and most reliable way to ensure that a platform can be widely adopted and succeed .