Home Page Icon
Home Page
Table of Contents for
Cover
Close
Cover
by Stefan Schimanski, Michael Hausenblas
Programming Kubernetes
Preface
Who Should Read This Book
Why We Wrote This Book
Ecosystem
Technology You Need to Understand
Conventions Used in This Book
Using Code Examples
O’Reilly Online Learning
How to Contact Us
Acknowledgments
1. Introduction
What Does Programming Kubernetes Mean?
A Motivational Example
Extension Patterns
Controllers and Operators
The Control Loop
Events
Edge- Versus Level-Driven Triggers
Changing Cluster Objects or the External World
Optimistic Concurrency
Operators
Summary
2. Kubernetes API Basics
The API Server
The HTTP Interface of the API Server
API Terminology
Kubernetes API Versioning
Declarative State Management
Using the API from the Command Line
How the API Server Processes Requests
Summary
3. Basics of client-go
The Repositories
The Client Library
Kubernetes API Types
API Machinery
Creating and Using a Client
Versioning and Compatibility
API Versions and Compatibility Guarantees
Kubernetes Objects in Go
TypeMeta
ObjectMeta
spec and status
Client Sets
Status Subresources: UpdateStatus
Listings and Deletions
Watches
Client Expansion
Client Options
Informers and Caching
Work Queue
API Machinery in Depth
Kinds
Resources
REST Mapping
Scheme
Vendoring
glide
dep
Go Modules
Summary
4. Using Custom Resources
Discovery Information
Type Definitions
Advanced Features of Custom Resources
Validating Custom Resources
Short Names and Categories
Printer Columns
Subresources
A Developer’s View on Custom Resources
Dynamic Client
Typed Clients
controller-runtime Client of Operator SDK and Kubebuilder
Summary
5. Automating Code Generation
Why Code Generation
Calling the Generators
Controlling the Generators with Tags
Global Tags
Local Tags
deepcopy-gen Tags
runtime.Object and DeepCopyObject
client-gen Tags
informer-gen and lister-gen
Summary
6. Solutions for Writing Operators
Preparation
Following sample-controller
Bootstrapping
Business Logic
Kubebuilder
Bootstrapping
Business Logic
The Operator SDK
Bootstrapping
Business Logic
Other Approaches
Uptake and Future Directions
Summary
7. Shipping Controllers and Operators
Lifecycle Management and Packaging
Packaging: The Challenge
Helm
Kustomize
Other Packaging Options
Packaging Best Practices
Lifecycle Management
Production-Ready Deployments
Getting the Permissions Right
Automated Builds and Testing
Custom Controllers and Observability
Summary
8. Custom API Servers
Use Cases for Custom API Servers
Example: A Pizza Restaurant
The Architecture: Aggregation
API Services
Inner Structure of a Custom API Server
Delegated Authentication and Trust
Delegated Authorization
Writing Custom API Servers
Options and Config Pattern and Startup Plumbing
The First Start
Internal Types and Conversion
Writing the API Types
Conversions
Defaulting
Roundtrip Testing
Validation
Registry and Strategy
API Installation
Admission
Deploying Custom API Servers
Deployment Manifests
Setting Up RBAC
Running the Custom API Server Insecurely
Certificates and Trust
Sharing etcd
Summary
9. Advanced Custom Resources
Custom Resource Versioning
Revising the Pizza Restaurant
Conversion Webhook Architecture
Conversion Webhook Implementation
Setting Up the HTTPS Server
Deploying the Conversion Webhook
Seeing Conversion in Action
Admission Webhooks
Admission Requirements in the Restaurant Example
Admission Webhook Architecture
Registering Admission Webhooks
Implementing an Admission Webhook
Admission Webhook in Action
Structural Schemas and the Future of CustomResourceDefinitions
Structural Schemas
Pruning Versus Preserving Unknown Fields
Controlling Pruning
IntOrString and RawExtensions
Default Values
Summary
A. Resources
General
Books
Tutorials and Examples
Articles
Repositories
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
Next
Next Chapter
Praise for Programming Kubernetes
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