O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The DevOps 2.3 Toolkit

Book Description

Learn from an expert on how to use Kubernetes, the most adopted container orchestration platform.

About This Book
  • Get a detailed, hands-on exploration of everything from the basic to the most advanced aspects of Kubernetes
  • Explore the tools behind not only the official project but also the third-party add-ons
  • Learn how to create a wide range of tools, including clusters, Role Bindings, and Ingress Resources with default backends, among many applicable, real-word creations
  • Discover how to deploy and manage highly available and fault-tolerant applications at scale with zero downtime
Who This Book Is For

This book is for professionals experienced with Docker, looking to get a detailed overview from the basics to the advanced features of Kubernetes.

What You Will Learn
  • Let Viktor show you the wide range of features available in Kubernetes—from the basic to the most advanced features
  • Learn how to use the tools not only from the official project but also from the wide range of third-party add-ons
  • Understand how to create a pod, how to Scale Bids with Replica Sets, and how to install both Kubectl and Minikube
  • Explore the meaning of terms such as container scheduler and Kubernetes
  • Discover how to create a local Kubernetes cluster and what to do with it
In Detail

Building on The DevOps 2.0 Toolkit, The DevOps 2.1 Toolkit: Docker Swarm, and The DevOps 2.2 Toolkit: Self-Sufficient Docker Clusters, Viktor Farcic brings his latest exploration of the DevOps Toolkit as he takes you on a journey to explore the features of Kubernetes.

The DevOps 2.3 Toolkit: Kubernetes is a book in the series that helps you build a full DevOps Toolkit. This book in the series looks at Kubernetes, the tool designed to, among other roles, make it easier in the creation and deployment of highly available and fault-tolerant applications at scale, with zero downtime.

Within this book, Viktor will cover a wide range of emerging topics, including what exactly Kubernetes is, how to use both first and third-party add-ons for projects, and how to get the skills to be able to call yourself a “Kubernetes ninja.”

Work with Viktor and dive into the creation and exploration of Kubernetes with a series of hands-on guides.

Style and approach

Readers join Viktor Farcic as he continues his exploration of DevOps and begins to explore the opportunities presented by Kubernetes.

Downloading the example code for this book You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Table of Contents

  1. Title Page
  2. Copyright
    1. The DevOps 2.3 Toolkit
  3. Dedication
  4. Contributor
    1. About the author
    2. Packt is searching for authors like you
  5. Packt Upsell
    1. Why subscribe?
    2. PacktPub.com
  6. Preface
    1. Overview
      1. Download the example code files
      2. Download the color images
      3. Conventions used
    2. Get in touch
  7. How Did We Get Here?
    1. A glimpse from the past
    2. A short history of infrastructure management
    3. A short history of deployment processes
    4. What is a container scheduler?
    5. What is Kubernetes?
  8. Running Kubernetes Cluster Locally
    1. Installing kubectl
    2. Installing Minikube
    3. Creating a local Kubernetes cluster with Minikube
    4. What now?
  9. Creating Pods
    1. Creating a Cluster
    2. Quick and dirty way to run Pods
    3. Defining Pods through declarative syntax
    4. Running multiple containers in a single Pod
    5. Monitoring health
    6. Pods are (almost) useless (by themselves)
    7. What now?
  10. Scaling Pods With ReplicaSets
    1. Creating a Cluster
    2. Creating ReplicaSets
    3. Operating ReplicaSets
    4. What now?
  11. Using Services to Enable Communication between Pods
    1. Creating a Cluster
    2. Creating Services by exposing ports
    3. Creating Services through declarative syntax
    4. Splitting the Pod and establishing communication through Services
    5. Defining multiple objects in the same YAML file
    6. Discovering Services
    7. What now?
    8. Kubernetes Pods, ReplicaSets, and Services compared to Docker Swarm stacks
  12. Deploying Releases with Zero-Downtime
    1. Creating a Cluster
    2. Deploying new releases
    3. Updating Deployments
    4. Zero-Downtime Deployments
    5. Rolling back or rolling forward?
    6. Rolling back failed Deployments
    7. Merging everything into the same YAML definition
    8. Updating multiple objects
    9. Scaling Deployments
    10. What now?
    11. Kubernetes Deployments compared to Docker Swarm stacks
  13. Using Ingress to Forward Traffic
    1. Creating a cluster
    2. Exploring deficiencies when enabling external access through Kubernetes services
    3. Enabling Ingress controllers
    4. Creating Ingress Resources based on paths
    5. Creating Ingress resources based on domains
    6. Creating an Ingress resource with default backends
    7. What now?
    8. Kubernetes Ingress compared to Docker Swarm equivalent
  14. Using Volumes to Access Host's File System
    1. Creating a cluster
    2. Accessing host's resources through hostPath volumes
    3. Using hostPath volume type to inject configuration files
    4. Using gitRepo to mount a Git repository
    5. Persisting state through the emptyDir volume type
    6. What now?
  15. Using ConfigMaps to Inject Configuration Files
    1. Creating a cluster
    2. Injecting configurations from files
    3. Injecting configurations from key/value literals
    4. Injecting configurations from environment files
    5. Converting ConfigMap output into environment variables
    6. Defining ConfigMaps as YAML
    7. A plea NOT to use ConfigMaps!
    8. What now?
    9. Kubernetes ConfigMaps compared to Docker Swarm configs
  16. Using Secrets to Hide Confidential Information
    1. Creating a Cluster
    2. Exploring built-in Secrets
    3. Creating and mounting generic Secrets
    4. Secrets compared to ConfigMaps
    5. Not so secretive Secrets
    6. What now?
    7. Kubernetes Secrets compared to Docker Swarm Secrets
  17. Dividing a Cluster into Namespaces
    1. Creating a Cluster
    2. Deploying the first release
    3. Exploring virtual clusters
    4. Exploring the existing Namespaces
    5. Deploying to a new Namespace
    6. Communicating between Namespaces
    7. Deleting a Namespace and all its Objects
    8. What now?
    9. Kubernetes Namespaces compared to Docker Swarm equivalent (if there is any)
  18. Securing Kubernetes Clusters
    1. Accessing Kubernetes API
    2. Authorizing requests
    3. Creating a Cluster
    4. Creating users
    5. Exploring RBAC authorization
    6. Peeking into pre-defined Cluster roles
    7. Creating Role bindings and Cluster Role bindings
    8. Replacing Users with Groups
    9. What now?
    10. Kubernetes RBAC compared to Docker Swarm RBAC
  19. Managing Resources
    1. Creating a cluster
    2. Defining container memory and CPU resources
    3. Measuring actual memory and CPU consumption
    4. Exploring the effects of discrepancies between resource specifications and resource usage
    5. Adjusting resources based on actual usage
    6. Exploring quality of service (QoS) contracts
    7. Defining resource defaults and limitations within a namespace
    8. Defining resource quotas for a namespace
    9. What now?
    10. Kubernetes resource management compared to docker swarm equivalent
  20. Creating a Production-Ready Kubernetes Cluster
    1. What is kubernetes operations (kops) project?
    2. Preparing for the cluster setup
    3. Creating a kubernetes cluster in AWS
    4. Exploring the components that constitute the cluster
    5. Updating the cluster
    6. Upgrading the cluster manually
    7. Upgrading the cluster automatically
    8. Accessing the cluster
    9. Deploying applications
    10. Exploring high-availability and fault-tolerance
    11. Giving others access to the cluster
    12. Destroying the cluster
    13. What now?
    14. Kubernetes operations (kops) compared to Docker for AWS
  21. Persisting State
    1. Creating a Kubernetes cluster
      1. Deploying stateful applications without persisting state
    2. Creating AWS volumes
    3. Creating Kubernetes persistent volumes
    4. Claiming persistent volumes
    5. Attaching claimed volumes to Pods
    6. Using storage classes to dynamically provision persistent volumes
    7. Using default storage classes
    8. Creating storage classes
    9. What now?
  22. The End
    1. Contributions
  23. Other Books You May Enjoy