Operating OpenShift

Book description

Kubernetes has gained significant popularity over the past few years, with OpenShift as one of its most mature and prominent distributions. But while OpenShift provides several layers of abstraction over vanilla Kubernetes, this software can quickly become overwhelming because of itsrich feature set and functionality. This practical book helps you understand and manage OpenShift clusters from minimal deployment to large multicluster installations.

Principal site reliability engineers Rick Rackow and Manuel Dewald, who worked together on Red Hat's managed OpenShift offering for years, provide valuable advice to help your teams operate OpenShift clusters efficiently. Designed for SREs, system administrators, DevOps engineers, andcloud architects, Operating OpenShift encourages consistent and easy container orchestration and helps reduce the effort of deploying a Kubernetes platform. You'll learn why OpenShift has become highly attractive to enterprises large and small.

  • Learn OpenShift core concepts and deployment strategies
  • Explore multicluster OpenShift Container Platform deployments
  • Administer OpenShift clusters following best practices
  • Learn best practices for deploying workloads to OpenShift
  • Monitor OpenShift clusters through state-of-the-art concepts
  • Build and deploy Kubernetes operators to automate administrative tasks
  • Configure OpenShift clusters using a GitOps approach

Publisher resources

View/Submit Errata

Table of contents

  1. Preface
    1. Conventions Used in This Book
    2. Using Code Examples
    3. O’Reilly Online Learning
    4. How to Contact Us
    5. Acknowledgments
  2. 1. Introduction
    1. Traditional Operations Teams
    2. How Site Reliability Engineering Helps
    3. OpenShift as a Tool for Site Reliability Engineers
    4. Individual Challenges for SRE Teams
  3. 2. Installing OpenShift
    1. OKD, OCP, and Other Considerations
      1. OKD
      2. OCP
      3. OSD, ROSA, and ARO
    2. Local Clusters with OpenShift Local
    3. Planning Cluster Size
      1. Instance Sizing Recommendations
      2. Node Sizing Recommendations
      3. Master Sizing Recommendations
      4. Infra Nodes
    4. Basic OpenShift Installations
      1. Installer-Provisioned Infrastructure
      2. Self-Provisioned Infrastructure
    5. Summary
  4. 3. Running Workloads on OpenShift
    1. Deploying Code
      1. Deploying Existing Container Images
      2. Deploying Applications from Git Repositories
    2. Accessing Deployed Services
      1. Accessing Services from Other Pods
      2. Distribution of Requests
    3. Exposing Services
      1. Route by Auto-generated DNS Names
      2. Route by Path
      3. External Load Balancers
    4. Securing Services with TLS
      1. Specifying TLS Certificates
      2. Redirecting Traffic to TLS Route
      3. Let’s Encrypt Trusted Certificates
      4. Encrypted Communication to the Service
    5. Summary
  5. 4. Security
    1. Cluster Access
    2. Role-Based Access Control
      1. Roles and ClusterRoles
      2. RoleBindings and ClusterRoleBindings
      3. CLI
    3. ServiceAccounts
    4. Threat Modelling
    5. Workloads
    6. Summary
  6. 5. Automating Builds
    1. OpenShift Image Builds
      1. Docker Build
      2. Source to Image (S2I) Build
      3. Custom S2I Images
    2. Red Hat OpenShift Pipelines
      1. Overview
      2. Install Red Hat OpenShift Pipelines
      3. Setting Up the Pipeline
      4. Turning the Pipeline into Continuous Integration
    3. Summary
  7. 6. In-Cluster Monitoring Stack
    1. Cluster Monitoring Operator
      1. Prometheus Operator
      2. User Workload Monitoring
    2. Visualizing Metrics
      1. Console Dashboards
      2. Using Grafana
    3. Summary
  8. 7. Advanced Monitoring and Observability Strategies
    1. Service Oriented Monitoring
      1. Service Level Indicators
      2. Service Level Objectives
      3. Tools
    2. Logging
      1. ClusterLogging
      2. Log Forwarding
      3. Loki
    3. Visualization
      1. Installation
      2. Creating a Grafana Instance
      3. Data Source
      4. Dashboards
    4. Summary
  9. 8. Automating OpenShift Cluster Operations
    1. Recurring Operations Tasks
      1. Application Updates
      2. Certificate Renewals
      3. OpenShift Updates
      4. Backups
    2. Automating Recurring Operations Tasks
      1. Persistence
      2. Creating Snapshots
      3. Using CronJobs for Task Automation
    3. Cluster Configuration
    4. Manage Cluster Configuration with OpenShift GitOps
      1. Installing OpenShift GitOps
      2. Managing Configuration with OpenShift GitOps
      3. Managing Configuration of Multiple Clusters with OpenShift GitOps
    5. Summary
  10. 9. Developing Custom Operators to Automate Cluster Operations
    1. Operator SDK
    2. Operator Design
    3. Bootstrapping the Operator
    4. Setting Up a CA Directory for Development
    5. Designing the Custom Resource Definition
    6. Installing the CustomResourceDefinition
    7. Local Operator Development
    8. The Reconcile Function
    9. Deploying the Operator
    10. Creating and Updating OpenShift Resources
    11. Specifying RBAC Permissions
    12. Routing Traffic to the Operator
    13. Adding Additional Controllers
    14. Updating Resource Status
    15. Summary
  11. 10. Practical Patterns for Operating OpenShift Clusters at Scale
    1. Cluster Lifecycle
    2. Cluster Configuration
    3. Logging
    4. Monitoring
    5. Alerting
    6. Automation
    7. On Call
      1. Primary On Call
      2. Backup On Call
      3. Shift Rotation
      4. Ticket Queue
    8. Incident Management
      1. When to Declare an Incident
      2. Inform the Customer
      3. Define Roles
      4. Incident Timeline
      5. Document the Process
      6. Postmortem
    9. Accessing OpenShift Clusters
    10. The Stage Is Yours
  12. Index
  13. About the Authors

Product information

  • Title: Operating OpenShift
  • Author(s): Rick Rackow, Manuel Dewald
  • Release date: November 2022
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9781098106393