Home Page Icon
Home Page
Table of Contents for
Kubernetes Cookbook
Close
Kubernetes Cookbook
by Ke-Jou Carol Hsu, Hui-Chuan Chloe Lee, Hideto Saito
Kubernetes Cookbook
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 works…
There's more…
See also
Forwarding container ports
Getting ready
How to do it…
Container-to-container communications
Pod-to-pod communications
Pod-to-service communications
External-to-internal communications
See also
Ensuring flexible usage of your containers
Getting ready
How to do it…
Pod as a job
Creating a job with multiple pods running
Pod as a daemon set
Running the daemon set only on specific nodes
How it works…
See also
Working with configuration files
Getting ready
YAML
JSON
How to do it…
How it works…
Pods
Replication controllers
Services
See also
4. Building a High Availability Cluster
Introduction
Clustering etcd
Getting ready
How to do it…
Static
etcd discovery
See also
Building multiple masters
Getting ready
How to do it…
Preparing multiple master nodes
Setting up kubelet in master
Getting the configuration files ready
Starting the kubelet service and turning daemons on!
How it works…
See also
5. Building a Continuous Delivery Pipeline
Introduction
Moving monolithic to microservices
Getting ready
How to do it…
Microservices
Frontend WebUI
How it works…
Microservices
Frontend WebUI
See also
Integrating with Jenkins
Getting ready
Install a Jenkins server which can build a Docker program
How to do it…
Create your Jenkins project
Run a program testing
Deploying a program
How it works…
There's more…
See also
Working with the private Docker registry
Getting ready
How to do it…
How it works…
Alternatives
Docker Trusted Registry
Nexus Repository Manager
Amazon EC2 Container Registry
See also
Setting up the Continuous Delivery pipeline
Getting ready
How to do it…
How it works…
There's more…
See also
6. Building Kubernetes on AWS
Introduction
Building the Kubernetes infrastructure in AWS
Getting ready
How to do it…
VPC and subnets
Internet Gateway and NAT
Route Table
Security group
How it works…
See also
Managing applications using AWS OpsWorks
Getting ready
How to do it…
The OpsWorks stack
The OpsWorks layer
Adjusting the IAM role
The OpsWorks instance
How it works…
See also
Auto-deploying Kubernetes through Chef recipes
Getting ready
Creating ELB and its security groups
Creating an OpsWorks stack
Creating application layers
How to do it…
Stack configuration for custom recipes
Recipes for etcd
Recipes for the Kubernetes master
Recipes for the Kubernetes node
Starting the instances
See also
Using AWS CloudFormation for fast provisioning
Getting ready
How to do it…
Creating a network infrastructure
Creating OpsWorks for application management
See also
7. Advanced Cluster Administration
Introduction
Advanced settings in kubeconfig
Getting ready
How to do it…
Setting a new credential
Setting a new cluster
Setting and changing the current context
Cleaning up kubeconfig
See also
Setting resource in nodes
Getting ready
How to do it…
Managing node capacity
Managing computing resources in a pod
See also
Playing with WebUI
Getting ready
How to do it…
How it works…
See also
Working with a RESTful API
Getting ready
How to do it…
How it works…
See also
Authentication and authorization
Getting ready
How to do it…
Enabling authentication for an API call
Basic authentication of etcd
Basic authentication of the Kubernetes master
Making use of user authorization
See also
8. Logging and Monitoring
Introduction
Collecting application logs
Getting ready
Elasticsearch
How to do it…
Logstash
Startup script
Dockerfile
Docker build
Kubernetes replication controller and service
Kibana
How it works…
See also
Working with Kubernetes logs
Getting ready
How to do it…
See also
Working with etcd log
Getting ready
How to do it…
See also
Monitoring master and node
Getting ready
Updating Kubernetes to the latest version: 1.2.1
Setting up the DNS server
Start the server using templates
Enable Kubernetes DNS in kubelet
How to do it…
Installing a monitoring cluster
Introducing the Grafana dashboard
Creating a new metric to monitor pods
See also
Index
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Table of Contents
Next
Next Chapter
Kubernetes Cookbook
Kubernetes Cookbook
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset