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

Getting Started with Kubernetes

Book Description

Orchestrate and manage large-scale Docker deployments with Kubernetes to unlock greater control over your infrastructure and extend your containerization strategy

About This Book

  • Learn the fundamentals of Kubernetes – how it works, and how it fits into the growing containerization trend
  • Integrate Kubernetes into your workflow alongside continuous delivery tools to address today’s operational challenges
  • Get to grips with a wide range of tools to help you monitor and secure your deployments

Who This Book Is For

If you have some experience with Docker and want to get more from containerization, this book is the perfect place to start. Focused on helping you take control of your deployments in a simple way, you’ll soon find out how to transform your operations for greater organizational and technical agility.

What You Will Learn

  • Download, install, and configure the latest version of Kubernetes
  • Perform smooth updates and patches with minimal downtime
  • Streamline the way you deploy and manage your applications with large-scale container orchestration
  • Find out how Kubernetes can simplify the way you configure your clusters and networks
  • Learn why the Open Container initiative is so important for the way you manage your infrastructure
  • Discover third-party tools that can enhance your production operations
  • Explore and use the most persistent storage options for your clusterter
  • Integrate Kubernetes with continuous delivery tools such as Gulp and Jenkins

In Detail

Kubernetes is the tool that’s pushing the containerization revolution – largely driven by Docker – to another level. If Docker has paved the way for greater agility and control in the way we organize and manage our infrastructure, Kubernetes goes further, by helping you to orchestrate and automate container deployments on a massive scale. Kubernetes really does think big – and it’s time you did too!

This book will show you how to start doing exactly that, showing you how to extend the opportunities that containerization innovations have brought about in new and even more effective ways. Get started with the basics - explore the fundamental elements of Kubernetes and find out how to install it on your system, before digging a little deeper into Kubernetes core constructs. Find out how to use Kubernetes pods, services, replication controllers, and labels to manage your clusters effectively and learn how to handle networking with Kubernetes.

Once you’ve got to grips with these core components, you’ll begin to see how Kubernetes fits into your workflow. From basic updates to integrating Kubernetes with continuous delivery tools such as Jenkins and Gulp, the book demonstrates exactly how Kubernetes will transform the way you work. With further insights on how to install monitoring and security tools, this book provides you with a direct route through Kubernetes – so you can take advantage of it, fast!

Style and approach

This straightforward guide will help you understand how to move your container applications into production through best practices and step by step walkthroughs tied to real-world operational strategies.

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 code file.

Table of Contents

  1. Getting Started with Kubernetes
    1. Table of Contents
    2. Getting Started with Kubernetes
    3. Credits
    4. About the Author
    5. Acknowledgments
    6. About the Reviewer
    7. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why subscribe?
        2. Free access for Packt account holders
    8. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    9. 1. Kubernetes and Container Operations
      1. A brief overview of containers
        1. What is a container?
      2. Why are containers so cool?
        1. Advantages to Continuous Integration/Continuous Deployment
        2. Resource utilization
      3. Microservices and orchestration
        1. Future challenges
      4. Advantages of Kubernetes
      5. Our first cluster
        1. Kubernetes UI
        2. Grafana
        3. Swagger
        4. Command line
        5. Services running on the master
        6. Services running on the minions
        7. Tear down cluster
      6. Working with other providers
        1. Resetting the cluster
      7. Summary
        1. Footnotes
        2. References
    10. 2. Kubernetes – Core Concepts and Constructs
      1. The architecture
        1. Master
        2. Node (formerly minions)
      2. Core constructs
        1. Pods
          1. Pod example
        2. Labels
        3. The container's afterlife
        4. Services
        5. Replication controllers
      3. Our first Kubernetes application
        1. More on labels
      4. Health checks
        1. TCP checks
        2. Life cycle hooks or graceful shutdown
      5. Application scheduling
        1. Scheduling example
      6. Summary
        1. Footnotes
    11. 3. Core Concepts – Networking, Storage, and Advanced Services
      1. Kubernetes networking
        1. Networking comparisons
          1. Docker
          2. Docker plugins (libnetwork)
          3. Weave
          4. Flannel
          5. Project Calico
        2. Balanced design
      2. Advanced services
        1. External services
        2. Internal services
        3. Custom load balancing
        4. Cross-node proxy
        5. Custom ports
        6. Multiple ports
        7. Migrations, multicluster, and more
        8. Custom addressing
      3. Service discovery
      4. DNS
      5. Persistent storage
        1. Temporary disks
        2. Cloud volumes
          1. GCE persistent disks
          2. AWS Elastic Block Store
        3. Other PD options
      6. Multitenancy
        1. Limits
      7. Summary
        1. Footnotes
    12. 4. Updates and Gradual Rollouts
      1. Example set up
      2. Scaling up
      3. Smooth updates
      4. Testing, releases, and cutovers
      5. Growing your cluster
        1. Scaling up the cluster on GCE
          1. Autoscaling and scaling down
        2. Scaling up the cluster on AWS
        3. Scaling manually
      6. Summary
    13. 5. Continuous Delivery
      1. Integration with continuous delivery
      2. Gulp.js
        1. Prerequisites
        2. Gulp build example
      3. Kubernetes plugin for Jenkins
        1. Prerequisites
        2. Installing plugins
          1. Configuring the Kubernetes plugin
      4. Bonus fun
      5. Summary
    14. 6. Monitoring and Logging
      1. Monitoring operations
      2. Built-in monitoring
        1. Exploring Heapster
        2. Customizing our dashboards
      3. FluentD and Google Cloud Logging
        1. FluentD
      4. Maturing our monitoring operations
        1. GCE (StackDriver)
          1. Sign-up for GCE monitoring
          2. Configure detailed monitoring
          3. Alerts
        2. Beyond system monitoring with Sysdig
          1. Sysdig Cloud
            1. Detailed views
            2. Topology views
            3. Metrics
          2. Alerting
          3. Kubernetes support
          4. The Sysdig command line
          5. The csysdig command-line UI
      5. Summary
        1. Footnotes
    15. 7. OCI, CNCF, CoreOS, and Tectonic
      1. The importance of standards
      2. Open Container Initiative
      3. Cloud Native Computing Foundation
      4. Standard container specification
      5. CoreOS
        1. rkt
        2. etcd
      6. Kubernetes with CoreOS
      7. Tectonic
        1. Dashboard highlights
      8. Summary
        1. Footnotes
    16. 8. Towards Production-Ready
      1. Ready for production
        1. Security
        2. Ready, set, go
      2. Third-party companies
        1. Private registries
        2. Google Container Engine
        3. Twistlock
        4. Kismatic
        5. Mesosphere (Kubernetes on Mesos)
        6. Deis
        7. OpenShift
      3. Where to learn more
      4. Summary
    17. Index