Introduction
Cloud computing is a paradigm shift away from traditional self-managed infrastructure to highly-available, on-demand, and scalable computing resources. Instead of building physical servers and managing hardware for individual applications or customers, cloud computing relies on managing computing capacity programmatically on public or private clouds. This approach to running applications means that resources can be provisioned immediately when they are needed, and only with the resources relevant for an application.
Kubernetes is a tool that is designed to manage cloud infrastructure and the applications running on it. It reduces the complexity of coordinating many physical and virtual machines, networks, and environments so that developers can focus on building and deploying their applications. Kubernetes also allows system administrators to focus on application delivery, availability, and scalability instead of managing individual servers and networks. Many applications can run simultaneously on a cloud that is managed with Kubernetes, and each application will only use the memory, CPU, and network resources that Kubernetes allocates to them.
This approach of using Kubernetes to programmatically manage and deploy applications on a cloud requires some familiarity with containers and building applications that can take advantage of the resilience and scalability that a tool like Kubernetes offers. The goal of this book is to familiarize you with Kubernetes, containers, microservices architectures, and managing applications on a Kubernetes cluster.
Introduction to this book
This book is designed to help newcomers and experienced users alike learn about Kubernetes. Its chapters are designed to introduce core Kubernetes concepts, and to build on them to a level where running an application on a production cluster is a familiar, repeatable, and automated process.
From there, more advanced topics are introduced, like how to manage a Kubernetes cluster itself. There are numerous tools, networking configurations, and processes that can be used to deploy, monitor, and run a cluster. This book will examine each topic in turn so that anyone who follows along will be able to build, manage, and monitor their own cluster.
This book is based on the Kubernetes for Full-Stack Developers curriculum found on DigitalOcean Community. It is structured around a few central topics:
- Learning Kubernetes core concepts
- Modernizing applications to work with containers
- Containerizing applications
- Deploying applications to Kubernetes
- Managing cluster operations
You should not feel obliged to follow the topics in any particular order. If one section is more interesting or relevant to you, explore it and come back to the others later if you prefer. Likewise, if you are already familiar with the concepts and tools in a given section, feel free to skip that one and focus on other topics.
What You’ll Learn
In terms of concrete learning outcomes, if you follow along with this book from the beginning, you will be able to:
- Explain how containers, pods, and services are used in a Kubernetes cluster
- Determine if containers are appropriate for running an application
- Describe and compose application components in terms of a microservices architecture
- Run an application in a standalone Docker container
- Modernize an example application to use containers and run on Kubernetes
- Upload and use container images hosted on public or private image registries
- Deploy an application into a Kubernetes cluster manually, using Helm for dependencies
- Monitor an application’s health in a Kubernetes cluster
- Monitor internal cluster health using Prometheus, Grafana, and Alertmanager
- Build a Continuous Integration and Deployment (CI/CD) pipeline to work with Kubernetes
- Create a Kubernetes cluster from scratch using Ansible
By the end of this book, you will have created your own Kubernetes cluster and deployed multiple containerized applications to it. Your applications will be designed around a microservices architecture so that you can individually manage and scale each as components in a larger application. You will also be able to set up and customize monitoring for your cluster, and the applications within it. These outcomes are just a small sample of what you can accomplish when using Kubernetes to build and manage cloud native applications.