Book Image

The Kubernetes Workshop

By : Zachary Arnold, Sahil Dua, Wei Huang, Faisal Masood, Mélony Qin, Mohammed Abu Taleb
Book Image

The Kubernetes Workshop

By: Zachary Arnold, Sahil Dua, Wei Huang, Faisal Masood, Mélony Qin, Mohammed Abu Taleb

Overview of this book

Thanks to its extensive support for managing hundreds of containers that run cloud-native applications, Kubernetes is the most popular open source container orchestration platform that makes cluster management easy. This workshop adopts a practical approach to get you acquainted with the Kubernetes environment and its applications. Starting with an introduction to the fundamentals of Kubernetes, you’ll install and set up your Kubernetes environment. You’ll understand how to write YAML files and deploy your first simple web application container using Pod. You’ll then assign human-friendly names to Pods, explore various Kubernetes entities and functions, and discover when to use them. As you work through the chapters, this Kubernetes book will show you how you can make full-scale use of Kubernetes by applying a variety of techniques for designing components and deploying clusters. You’ll also get to grips with security policies for limiting access to certain functions inside the cluster. Toward the end of the book, you’ll get a rundown of Kubernetes advanced features for building your own controller and upgrading to a Kubernetes cluster without downtime. By the end of this workshop, you’ll be able to manage containers and run cloud-based applications efficiently using Kubernetes.
Table of Contents (20 chapters)
Preface

Introduction

In the previous chapter, we learned how to use kubectl to interact with the Kubernetes API. In this chapter and the upcoming chapters, we will use that knowledge to interact with the API to create various types of Kubernetes objects.

In a Kubernetes system, many entities represent the state of the cluster and what the cluster's workload looks like. These entities are known as Kubernetes objects. Kubernetes objects describe various things, for example, what containers will be running in the cluster, what resources they will be using, how those containers will interact with each other, and how they will be exposed to the outer world.

A pod is the basic building block of Kubernetes, and it can be described as the basic unit of deployment. Just like we define a process as a program in execution, we can define a pod as a running process in the Kubernetes world. Pods are the smallest unit of replication in Kubernetes. A pod can have any number of containers running...