Benjamin Schmeling and Maximilian Dargatz

Kubernetes Native Development

Develop, Build, Deploy, and Run Applications on Kubernetes

Foreword by Markus Eisele
Benjamin Schmeling
Bensheim, Germany
Maximilian Dargatz
Halle (Saale), Sachsen-Anhalt, Germany
ISBN 978-1-4842-7941-0e-ISBN 978-1-4842-7942-7
© Benjamin Schmeling and Maximilian Dargatz 2022
This work is subject to copyright. All rights are solely and exclusively licensed by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication does not imply, even in the absence of a specific statement, that such names are exempt from the relevant protective laws and regulations and therefore free for general use.
The publisher, the authors and the editors are safe to assume that the advice and information in this book are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or the editors give a warranty, expressed or implied, with respect to the material contained herein or for any errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

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.

Foreword

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

Introduction

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!

Acknowledgments

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

Table of Contents
About the Authors
Benjamin Schmeling
is an IT professional with more than 15 years of experience in developing, building, and deploying Java-based software. Today, he works as a solution architect for Red Hat, with a passion for the design and implementation of cloud-native applications running on Kubernetes-based container platforms.
 
Maximilian Dargatz
has been working in the IT industry for more than ten years and consults clients on their journey to modernize applications for containers and Kubernetes. He currently works for IBM as a solution architect, working with large German clients on their cloud adoption and how to apply DevOps concepts.
 
About the Technical Reviewer
Markus Eisele
is a Java Champion, former Java EE Expert Group member, founder of JavaLand, reputed speaker at Java conferences around the world, and a very well-known figure in the Enterprise Java world.

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.

 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.246.203