Book Image

Kubernetes on AWS

By : Ed Robinson
Book Image

Kubernetes on AWS

By: Ed Robinson

Overview of this book

Docker containers promise to radicalize the way developers and operations build, deploy, and manage applications running on the cloud. Kubernetes provides the orchestration tools you need to realize that promise in production. Kubernetes on AWS guides you in deploying a production-ready Kubernetes cluster on the AWS platform. You will then discover how to utilize the power of Kubernetes, which is one of the fastest growing platforms for production-based container orchestration, to manage and update your applications. Kubernetes is becoming the go-to choice for production-grade deployments of cloud-native applications. This book covers Kubernetes from first principles. You will start by learning about Kubernetes' powerful abstractions - Pods and Services - that make managing container deployments easy. This will be followed by a guided tour through setting up a production-ready Kubernetes cluster on AWS, while learning the techniques you need to successfully deploy and manage your own applications. By the end of the book, you will have gained plenty of hands-on experience with Kubernetes on Amazon Web Services. You will also have picked up some tips on deploying and managing applications, keeping your cluster and applications secure, and ensuring that your whole system is reliable and resilient to failure.
Table of Contents (12 chapters)

Volumes

Let's start by looking at how we can attach volumes to our pods. The simplest kind of volume available emptyDir is just a temporary directory that is linked to the life cycle of a pod. When the volume is created, it is empty as the name suggests, and remains on the node until the pod is removed from the node. The data you store inside the volume does persist between pod restarts on the same node, so can be useful for processes that need to cache expensive computations on the filesystem, or for processes that checkpoint their progress. In Chapter 1, Google's Infrastructure for the Rest of Us, we discussed some other possible uses for an emptyDir volume to share files between different containers within a pod.

In this example, we are going to make use of an emptyDir volume to deploy an application that expects to write to the /data directory in a container where...