Learn Kubernetes step by step with this interactive book

SearchITOperations spoke with author Zach Arnold about what IT pros can expect from The Kubernetes Workshop, an interactive book that progressively builds readers' knowledge of container orchestration.

As Kubernetes dominates the container management market, more IT professionals find themselves faced with the challenge of learning the orchestration platform. The good news is that there are plenty of available training resources for those new to Kubernetes -- or even to containers in general.

One such resource is The Kubernetes Workshop: A New, Interactive Approach to Learning Kubernetes. The book -- which features step-by-step tutorials and supplements its text with interactive learning materials online -- helps readers learn Kubernetes architecture, along with the variety of ways in which they can implement and use the container orchestration system.

"Kubernetes is the data center-in-a-box-style tool that has 1,000,001 moving parts, and they all interact with some other part," said Zach Arnold, one of The Kubernetes Workshop authors. "[Whether] you're in public cloud or in a corporate data center, there [are] a lot of buttons and levers you can push."

The book builds on the reader's Kubernetes knowledge, chapter by chapter. "We cover all of the basics: Kubernetes terminology, the proper nouns and the alphabet soup that comes along with that," Arnold said. "And then we dive into using the Amazon Web Services cloud to actually run production-capable clusters with production-capable configurations with security, networking, storage and computational principles."

How to get started setting up Kubernetes

Learn about the different components of Kubernetes and how they work together by installing a cluster using Minikube.

Download Now

To teach these concepts and principles, The Kubernetes Workshop offers a range of content types -- from text to video lessons and assessments -- that readers can follow at their own pace. People who purchase the book from Amazon will receive a coupon code to access the videos from Packt's website.

The second chapter, "An Overview of Kubernetes," provides the first hands-on exercises in the book. It dives into core Kubernetes components, such as etcd, the API server and kubelet, and details why -- and how -- these components interact. To learn Kubernetes step by step and practice these exercises, readers will need to install Minikube -- software that runs Kubernetes locally.

Kubernetes is the data center-in-a-box-style tool that has 1,000,001 moving parts.
Zach ArnoldAuthor, The Kubernetes Workshop

The format of this chapter -- and of The Kubernetes Workshop overall -- folds in theory with practical application. In this way, the reader's knowledge won't be confined to, for example, just what a Kubernetes pod or node is, but how they need to deploy and manage these components to support multiple containers in production.

"If you're an IT administrative professional or a new graduate of school and you're just starting out your career -- or if your organization is trying to pivot towards the cloud or DevOps methodology when it comes to how they build and run software -- this book covers essentially everything that starts with a container and ends in orchestration in production," Arnold said.

For example, this brief excerpt from Chapter 2 explains how to write pod specifications:

Next, let's learn how to run a single container in Kubernetes by composing the Pod spec file (also called the specification, manifest, config, or configuration file). In Kubernetes, you can use YAML or JSON to write this specification file, though YAML is commonly used since it is more human-readable and editable.

Consider the following YAML spec for a very simple pod:

kind: Pod
apiVersion: v1
metadata:
  name: k8s-for-beginners
spec:
  containers:
  - name: k8s-for-beginners
    image: packtworkshops/the-kubernetes-workshop:k8s-for-beginners

Let's go through the different fields briefly:

  • kind tells Kubernetes which type of object you want to create. Here, we are creating a Pod. In later chapters, you will see many other kinds, such as Deployment, StatefulSet, ConfigMap, and so on.
  • apiVersion specifies a particular version of an API object. Different versions may behave a bit differently.
  • metadata includes some attributes that can be used to uniquely identify the pod, such as name and namespace. If we don't specify a namespace, it goes in the default namespace.
  • spec contains a series of fields describing the pod. In this example, there is one container that has its image URL and name specified.

Pods are one of the simplest Kubernetes objects to deploy, so we will use them to learn how to deploy objects using YAML manifests in the following exercise.

Editor's note: This chapter excerpt is from The Kubernetes Workshop: A New, Interactive Approach to Learning Kubernetes, authored by Zach Arnold, Sahil Dua, Wei Huang, Faisal Masood, Melony Qin and Mohammed Abu Taleb, expected to publish with Packt Publishing Ltd., July 2020, ISBN: 9781838820756. To read Chapter 2 of the book in its entirety, click here.

Dig Deeper on Containers and virtualization

Software Quality
App Architecture
Cloud Computing
SearchAWS
TheServerSide.com
Data Center
Close