Kubernetes is all about applications. Brian Ketelsen walks you through utilizing the Kubernetes API to deploy, manage, and upgrade applications. You’ll use an example application called “app” to complete the labs; app is hosted on GitHub and provides an example 12-factor application.
Docker images used in the tutorial:
Creating and managing Pods
At the core of Kubernetes is the Pod. Pods represent a logical application and hold a collection of one or more containers and volumes. In this lab, you will learn how to:
Monitoring and health checks
Kubernetes supports monitoring applications in the form of readiness and liveness probes. Health checks can be performed on each container in a Pod. Readiness probes indicate when a Pod is “ready” to serve traffic. Liveness probes indicate a container is “alive.” If a liveness probe fails multiple times, the container will be restarted. Liveness probes that continue to fail will cause a Pod to enter a crash loop. If a readiness check fails, the container will be marked as not ready and will be removed from any load balancers. In this lab, you will deploy a new Pod named healthy-monolith, which is largely based on the monolith Pod with the addition of readiness and liveness probes. You will learn how to:
Managing application configurations and secrets
Many applications require configuration settings and secrets such as TLS certificates to run in a production environment. In this lab you will learn how to:
Creating and managing services
Services provide stable endpoints for Pods based on a set of labels. In this lab, you will create the monolith service and “expose” the secure-monolith Pod externally. You will learn how to:
Creating and managing deployments
Deployments abstract away the low-level details of managing Pods. Pods are tied to the lifetime of the node they are created on. When the node goes away, so does the Pod. ReplicaSets can be used to ensure one or more replicas of a Pod are always running, even when nodes fail. Deployments sit on top of ReplicaSets and add the ability to define how updates to Pods should be rolled out. In this lab, you will combine everything you have learned about Pods and services to break up the monolith application into smaller services. You will create three deployments, one for each service:
You will also define internal services for the auth and hello deployments and an external service for the frontend deployment.
Rolling out updates
Kubernetes makes it easy to roll out updates to your applications using the built-in rolling update mechanism. In this lab, you will learn how to:
Brian Ketelsen is a cloud developer advocate at Microsoft. An experienced leader of technical teams with a strong focus on data warehouses and distributed computing, Brian has been writing software for various platforms since 1993. He has honed his broad technical skills in a variety of roles ranging from DBA to CIO. A prolific open source enthusiast, he has contributed to some of the largest Go projects, including Docker, Kubernetes, etc, SkyDNS, Kong, Go-Kit, and Goa, and coauthored Go in Action from Manning Press. Brian spends much of his free time fostering the Go community; he co-organizes GopherCon, the yearly conference for Go programmers held each summer in Denver and helps organize the Tampa Go meetup. Brian holds a bachelor’s degree in computer science.
©2016, O’Reilly UK Ltd • (800) 889-8969 or (707) 827-7019 • Monday-Friday 7:30am-5pm PT • All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners. • email@example.com