O'Reilly logo
live online training icon Live Online training

9 Steps to Awesome with Kubernetes

For Developers, learn nine simple and practical steps that will take you from Kubernetes novice to cloud native application architect

Burr Sutter

Everybody seems to be rocking with Kubernetes from the Cloud Native Compute Foundation (cncf.io) as it has become the defacto standard for hybrid cloud portable application architecture. Even your favorite open source repositories at GitHub are running on top of it. Microservice architecture adoption continues to boom and Kubernetes is the ideal solution for deploying and managing the dozens of microservices your organization crafting.

This live hands-on session is for any developer who is interested in Linux containers and cloud native application architecture. Our examples will primarily be in Java as there is some special “care and feeding” related to Java in a container but the lessons are applicable to any programming language.

What you'll learn-and how you can apply it

  • Installation & Getting Started
  • Building & Running Container Images
  • Peering inside your container with kubectl/oc exec
  • Environment variables and ConfigMaps
  • Streaming your logs
  • Service to service discovery & load-balancing
  • Being live & ready
  • Rolling updates plus advanced deployment strategies like blue/green, canary
  • Debugging your code, in your pod

This training course is for you because...

  • Web and API developers
  • Microservice cloud native focused architects

Prerequisites

  • Attendees should be comfortable with Web/API/Microservice-style application development
  • Attendees should be comfortable with a Linux command line

Course Setup:

Installation & Getting Started Instructions

Recommended Preparation:

Recommended Follow-up:

About your instructor

  • A lifelong developer advocate, community organizer, and technology evangelist, Burr Sutter is a featured speaker at technology events around the globe—from Bangalore to Brussels and Berlin to Beijing (and most parts in between)—he is currently Red Hat’s Director of Developer Experience. A Java Champion since 2005 and former president of the Atlanta Java User Group, Burr founded the DevNexus conference—now the second largest Java event in the U.S.—with the aim of making access to the world’s leading developers affordable to the developer community. When not speaking abroad, Burr is also the passionate creator and orchestrator of highly-interactive live demo keynotes at Red Hat Summit, the company’s premier annual event.

Schedule

The timeframes are only estimates and may vary according to how the class is progressing

Segment 1: Why we are here? Microservices & Cloud Native architecture (15 minutes)

  • Instructor provides insights into why as a developer you are interested in Microservices architecture and Cloud Native applications.
  • Participants will learn why organizations are so enthusiastically embracing microservices and cloud native application architecture as well as some of the pitfalls & challenges associated with adopting these new techniques and associated technologies.

Segment 2: Overview of Kubernetes Concepts (15 minutes)

  • Instructor will give an overview of Kubernetes key terms and nomenclature. We will also discuss 12 Factor Application principles and how they map into Kubernetes and this course.
  • Participants will learn about clusters, nodes, namespaces, pods, labels, services, deployments, etc. and why these elements are important for a cloud native application.

Segment 3: Installation and Getting Started (10 minutes)

  • Instructor will explain a few different ways to setup a Kubernetes-focused developer environment, demonstrating how to get started on a laptop/desktop computer.
  • Participants will learn how to install and configure a single-node cluster and deploy their first pod

Q&A (5 mins)

Segment 4: Building & Running Container Images (10 minutes)

  • Instructor will provide some key insights into how to build docker/linux container images, specifically ones that work well with Java-based applications. Linux containers are immutable, meaning a change should be checked into source control and a new image built before deployment
  • Participants will learn how to build images, how to deploy pods based on those images, how to scale out and load-balance across multiple containers based on those images

Segment 5: Environment variables and ConfigMaps (10 minutes)

  • Externalized configuration is a key 12 Factor principle, Instructor will demonstrate how configuration is injected into your application logic.
  • Participants will learn how Kubernetes Configmap works.

Segment 6: Peering inside your container with kubectl/oc exec (10 minutes)

  • Instructor will demonstrate how you can inspect your resulting container, helping you to debug your image/container
  • Participants will learn a critical step in debugging their Linux process, running inside of a container, as a pod inside of Kubernetes.

Segment 7: Streaming your logs (10 minutes)

  • Instructor will explain how to retrieve logs from stdout (System.out.println)
  • Participants will learn about this critical debugging capability as well as tools like stern that make log streaming across N containers and microservices easier

Q&A (5 mins) Break (10 minutes)

Segment 8: Service to service discovery & load-balancing (10 minutes)

  • Instructor will give an overview of the distributed computing nature of microservices and how service discover and load-balancing are accomplished via Kubernetes.
  • Participants will learn how a Service works in Kubernetes

Segment 9: Rolling updates plus advanced deployment strategies like blue/green, canary (20 minutes)

  • Instructor will demonstrate some of the most exciting aspects of adopting Kubernetes/Openshift. Rolling updates of new code changes are handled automatically by Kubernetes, insuring that you have no downtime during a deployment. Blue/Green deployments where you have two version of the application in production concurrently with easy cut-over and fallback capabilities. Canary deployments where you only have a fraction of end-user traffic flowing to the newest version of your codebase, allowing for in-production testing.
  • Participants will learn how to leverage rolling updates, blue/green and canary deployments with their application code inside of a Kubernetes infrastructure.

Segment 10: Being live & ready (15 minutes)

  • Instructor will explain the Liveness and Readiness probes of Kubernetes. These two elements are key to Kubernetes self-managing, self-healing architecture. Furthermore, these features can be exploited to enable things like stateful session fail-over during a rolling update
  • Participants will understand how to configure a liveness and readiness probe for their pod/container and gain a better understanding of the pod lifecycle

Q&A (5 mins)

Segment 11: Debugging your code, in your pod (10 minutes)

  • Instructor will demonstrate how to setup and configure an IDE debugger where you can step through your Java code, running inside of its container, running inside of Kubernetes.
  • Participants will learn the steps needed to leverage an IDE debugger

Segment 12: Conclusion & Bonus Material with Istio Service Mesh (20 minutes)

  • Instructor will demonstrate how Istio Service Mesh augments the base capabilities of Kubernetes. Smarter canary deployments, dark launches, resiliency and observability.
  • Participants will get a taste of Istio Service Mesh and its advanced capabilities