Kubernetes Cookbook
eBook - ePub

Kubernetes Cookbook

  1. 376 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

About this book

Learn how to automate and manage your Linux containers and improve the overall performance of your system

About This Book

  • Are you using containers in your organization and want to better manage, scale, and orchestrate apps on the container? Use the recipes in the book to find a reliable solution from experts
  • This is the first and only book on the market on Kubernetes, and it will show how to manage your containers in production using Kubernetes
  • Buy this book, simply follow the recipes, and you will be the master of your Linux containers

Who This Book Is For

The book is aimed at system administrators who have intermediate level of knowledge with Kubernetes and want to better manage their applications deployed over containers. Also, it will help those administrators who want to maintain and scale applications on these containers.

What You Will Learn

  • Get to know how to build your own container cluster
  • Deploy and manage highly scalable applications using Kubernetes
  • Discover how to build high availability Kubernetes clusters
  • Find out how to build a continuous delivery pipeline for your application
  • Track metrics and logs for every container running in your cluster
  • Streamline the way you deploy and manage your applications with large-scale container orchestration

In Detail

Kubernetes is Google's solution to managing a cluster of containers. Kubernetes provides a declarative API to manage clusters while giving us a lot of flexibility. This book will provide you with recipes to better manage containers in different scenarios in production using Kubernetes.

We will start by giving you a quick brush up on how Kubernetes works with containers along with an overview of the main Kubernetes features such as Pods, Replication Controllers, and more. Next, we will teach you how to create Kubernetes cluster and how to run programs on Kubernetes. We'll explain features such as High Availability Kubernetes master setup, using Kubernetes with Docker, and orchestration with Kubernetes using AWS. Later, will show you how to use Kubernetes-UI, and how to set up and manage Kubernetes clusters on the cloud and bare metal.

Upon completion of this book, you will be able use Kubernetes in production and will have a better understanding of how to manage your containers using Kubernetes.

Style and approach

This recipe-based book precisely teaches you how to use Kubernetes in production and how to better manage your containers using Kubernetes.

Tools to learn more effectively

Saving Books

Saving Books

Keyword Search

Keyword Search

Annotating Text

Annotating Text

Listen to it instead

Listen to it instead

Information

Kubernetes Cookbook


Table of Contents

Kubernetes Cookbook
Credits
About the Authors
About the Reviewer
www.PacktPub.com
eBooks, discount offers, and more
Why Subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Building Your Own Kubernetes
Introduction
Exploring architecture
Getting ready
How to do it…
Kubernetes master
API server (kube-apiserver)
Scheduler (kube-scheduler)
Controller manager (kube-controller-manager)
Command Line Interface (kubectl)
Kubernetes node
kubelet
Proxy (kube-proxy)
How it works…
etcd
Overlay network
Flannel
See also
Preparing your environment
Getting ready
Hardware resource
Operating system
How to do it…
Kubernetes master
Kubernetes nodes
etcd
See also
Building datastore
How to do it…
Red Hat Enterprise Linux 7 or CentOS 7
Ubuntu Linux 15.10 Wily Werewolf
Other Linux
Download a binary
Creating a user
Install etcd
How it works…
Auto startup script
Startup script (systemd)
Startup script (init)
Configuration
See also
Creating an overlay network
Getting ready
Installation
CentOS 7 or Red Hat Enterprise Linux 7
Other Linux options
How to do it…
Flannel networking configuration
Integrating with Docker
How it works…
See also
Configuring master
Getting ready
How to do it…
Installation
CentOS 7 or Red Hat Enterprise Linux 7
Adding daemon dependency
Other Linux options
Verification
See also
Configuring nodes
Getting ready
How to do it…
Installation
CentOS 7 or Red Hat Enterprise Linux 7
Other Linux options
Verification
See also
Run your first container in Kubernetes
Getting ready
How to do it…
Running an HTTP server (nginx)
Exposing the port for external access
Stopping the application
How it works…
See also
2. Walking through Kubernetes Concepts
Introduction
An overview of Kubernetes control
Getting ready
How to do it…
How it works…
See also
Working with pods
Getting ready
How to do it…
How it works…
See also
Working with a replication controller
Getting ready
How to do it…
Creating a replication controller
Getting information of a replication controller
Changing the configuration of a replication controller
Removing a replication controller
How it works…
See also
Working with services
Getting ready
How to do it…
Creating services for different resources
Creating a service for a pod
Creating a service for the replication controller and adding an external IP
Creating a no-selector service for an endpoint
Creating a service with session affinity based on another service
Creating a service in a different type
Creating a service in NodePort type
Deleting a service
How it works…
See also
Working with volumes
Getting ready
How to do it…
emptyDir
hostPath
nfs
glusterfs
iscsi
flocker
rbd
gitRepo
awsElasticBlockStore
gcePersistentDisk
downwardAPI
There's more…
PersistentVolume
See also
Working with secrets
Getting ready
How to do it…
Creating a secret
Picking up secret in the container
Deleting a secret
How it works…
There's more…
See also
Working with names
Getting ready
How to do it…
How it works…
See also
Working with namespaces
Getting ready
How to do it…
Changing the default namespace
Deleting a namespace
There's more…
Deleting LimitRange
See also
Working with labels and selectors
Getting ready
How to do it…
Linking service with a replication controller by using label selectors
There's more…
See also
3. Playing with Containers
Introduction
Scaling your containers
Getting ready
How to do it…
How it works…
See also
Updating live containers
Getting ready
How to do it…
How it ...

Table of contents

  1. Kubernetes Cookbook

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access Kubernetes Cookbook by Hideto Saito, Hui-Chuan Chloe Lee, Ke-Jou Carol Hsu in PDF and/or ePUB format, as well as other popular books in Computer Science & System Administration. We have over one million books available in our catalogue for you to explore.