This Apress imprint is published by the registered company APress Media, LLC part of Springer Nature.
The registered company address is: 1 New York Plaza, New York, NY 10004, U.S.A.
For our great families and spectacular wives.
Complexity kills. Complexity sucks the life out of users, developers, and IT. Complexity makes products difficult to plan, build, test and use. Complexity introduces security challenges. Complexity causes administrator frustration.
—Ray Ozzie (2005)
Estimating and managing complexity dictates developer lives since more and more cross-cutting concerns move down the stack. Just a few short years back, bare metal was the foundation for mostly read-write-oriented, centralized applications. Centralized, expensive undertakings that require a lot of planning and use of a few, specialized tools. With the invention of commodity hardware, scaling and availability moved out of physical hardware and landed in application servers. Something like a promised land for application developers. An environment that includes everything necessary to build complex applications on standardized APIs mostly without having to care about how data moves between components, databases, or integrated systems. What looked and felt easy buried a secret. Software architecture is something that needs planning and enforcement. Without one or the other, the results become unmaintainable and ultimately unmanageable. Back a square again. Taking apart applications, increasing packaging density on environments, and orchestrating stateful pieces back into a whole, we saw Kubernetes entering the scene. Taking apart centralized applications and running them on stateless, virtualized pieces of hardware became the most prestigious art in software development. But complexity and challenges are hidden wherever you look. To successfully navigate this brave new world, you need a handy guide. This is exactly what Max and Benjamin delivered in this book, and you can rest assured that they will not let you down in complexity and confusion while working their way through cloud-native applications on Kubernetes.
—Markus Eisele
Developer Strategist, Red Hat EMEA
Markt Schwaben, Germany
January 6, 2022
The emergence of Kubernetes in the year 2015 revolutionized IT and increased the speed of innovation. In the meantime, it evolved into the de facto standard for container orchestration and can now serve as an abstraction layer above public and private clouds. With its help, many operational tasks can be automated and standardized. Through its clustering approach, Kubernetes can virtually build one big supercomputer out of many distinct commodity servers. It takes over the scheduling and orchestration of container workloads freeing operations from the burden to manage each server, enabling them to shift their attention toward the application.
From a developer’s point of view, however, you could ask: Why should I care where my application is running? The DevOps movement revealed the benefits of developers and operations working tightly together. So developers should indeed care about how and where their software runs. This, among others, will allow them to leverage the capabilities of the target execution environment. Kubernetes has a lot to offer, especially for developers, as we will demonstrate in this book.
We intend to motivate you as a developer to write Kubernetes-native applications to leverage the full power of Kubernetes. To convince you of the benefits, we will take you on a journey through the Kubernetes universe along the typical development lifecycle from planning and designing to coding, building, deploying, and finally running and monitoring your application. We will make a stop at each distinct lifecycle phase, in which we discuss how Kubernetes could help and what you should do to leverage its manifold capabilities.
On this journey, we will provide you with a running example that we will use as a tangible reference throughout the whole book. It is a polyglot Kubernetes-native application that is based on different programming languages such as Java, Python, and Golang using different types of frameworks and a domain-specific integration language. It implements a simple but fruitful use case: analyzing RSS news feeds, recognizing locations in its title, and mapping them to the respective geo-coordinates. This allows us to render news on a map; this is why we called it the Local News application. The complete code is accessible via GitHub and can serve as a blueprint for your applications.
We hope that you are curious now and eager to write your first Kubernetes-native application. Enjoy reading the book and let Kubernetes-native development inspire you for writing your next-generation applications!
First of all, we have to thank the countless people powering the open source ecosystem around Kubernetes. Without their help, it would be impossible to give so many powerful technologies into the hands of our readers right on their own laptops.
Also, we have to thank everyone who helped to write, review, and improve this book including our close colleagues and in particular our reviewers, most importantly, Markus Eisele.
Writing a book like this takes a lot of time and passion. Many thanks to my lovely wife Sabrina Schmeling and our wonderful children Jonas and Sebastian for giving me the strength and time to devote myself to this project. Furthermore, I would like to thank my parents and my brother for their support and inspiration.
—Benjamin Schmeling
This book would not have been possible without the everlasting support of my friends and family. Felix Müller supported me heavily and created some of the great illustrations in this book. Jakob Blume – a frenetic Kubernetes enthusiast and entrepreneur – gave me so much inspiration and feedback on our weekly evening jogs. My four wonderful children were a charm when they kept talking about “Kubanetis.” And, ultimately, my gorgeous wife Julia Dargatz found exactly the right words to keep me going whenever I needed them. I owe her everything.
—Maximilian Dargatz
With more than 18 years of professional experience in the industry, he designed and developed large Enterprise-grade applications for Fortune 500 companies. As an experienced team lead and architect, he helped implement some of the largest integration projects in automotive, finance, and insurance companies.
More than 14 years of international speaking experience and 6 years in developer advocacy with a strong focus on Java platforms helped him build a large network of professionals and influencers.
He is an O’Reilly author and helped with technical reviews of more than ten books about technologies he cares for. He published more than 100 articles in various IT publications over the last 12 years.
You can follow him on Twitter at @myfear.
18.224.246.203