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)

Provisioning add-ons

Much of the power of Kubernetes comes from the fact that it is easy to extend by adding additional services to provide additional functionality.

We are going to look at an example of this by deploying kube2iam. This is a daemon that runs on every node in our cluster and intercepts calls to the AWS metadata service that are made by processes running in our pods.

A simple way to provision a service like this is by using a DaemonSet to run a pod on every node in the cluster, as shown in the following code. This approach is already used in our cluster to deploy the aws-vpc-cni networking plugin to every node and to run kube-proxy, the Kubernetes component that runs on every node and that is responsible for routing traffic that is destined for service IPs to the underlying pods:

kube2iam.yaml
--- apiVersion: v1 kind: ServiceAccount metadata: name: kube2iam...