Chapter 4. Introducing Our Production Application
In this chapter, we provide several examples that walk you through running an enterprise-quality application on Kubernetes. We begin with a discussion about microservices in Kubernetes. We then introduce several important concepts, explaining each one as we go.
We invite you to prepare your own cluster to run these examples yourself. We explain a few options for running your own Kubernetes cluster and configuring your command-line interface (CLI) in Appendix A.
Our First Microservice
Lao Tzu is credited with the saying, “A journey of a thousand miles begins with one step.” So it is with microservices. Let’s dig in on our first microservice by building an example end to end. We will then expand to a complete application.
We recommend two foundational learning resources for building great microservices: Twelve-Factor Apps, and Stability and Availability Patterns described in the book Release It!.
Each factor in The Twelve-Factor manifesto isolates one aspect of building scalable, manageable microservices. Characteristics such as declarative format and separation of concerns are emphasized.
One of the Twelve Factors that enables scalable web services is the externalization of configuration via the process environment. Many aspects of Kubernetes can be directly mapped back to Twelve-Factor principles. For example, as you’ve already seen in Chapter 3, Kubernetes defines ConfigMaps and Secrets to provide configuration to your app. Configuration ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access