《Kubernetes Best Practices》Kubernetes最佳实践
《Kubernetes Best Practices》Kubernetes最佳实践
目前发现的讲的比较全面的一本书,先从概念开始讲起,设计的领域很全,基本上就是生产环境中用到的包括持续集成,机器学习等都讲到老,然后再讲生产环境中的最佳实践,推荐给大家。
by Lachlan Evenson, Dave Strebel, Eddie Villalba, Brendan Burns Publisher: O’Reilly Media, Inc. Release Date: November 2019 ISBN: 9781492056478
Book Description
In this practical guide, four Kubernetes professionals with deep experience in distributed systems, enterprise application development, and open source will guide you through the process of building applications with this container orchestration system. Based on the experiences of companies that are running Kubernetes in production successfully, many of the methods are also backed by concrete code examples.
This book is ideal for those already familiar with basic Kubernetes concepts who want to learn common best practices. You’ll learn exactly what you need to know to build your best app with Kubernetes the first time.
Set up and develop applications in Kubernetes Learn patterns for monitoring, securing your systems, and managing upgrades, rollouts, and rollbacks Understand Kubernetes networking policies and where service mesh fits in Integrate services and legacy applications and develop higher-level platforms on top of Kubernetes Run machine learning workloads in Kubernetes
Table of Contents
Preface
Who Should Read This Book
Why We Wrote This Book
Navigating This Book
Conventions Used in This Book
Using Code Examples
O’Reilly Online Learning
How to Contact Us
Acknowledgments
-
Setting Up a Basic Service
Application Overview
Managing Configuration Files
Creating a Replicated Service Using Deployments
Setting Up an External Ingress for HTTP Traffic
Configuring an Application with ConfigMaps
Managing Authentication with Secrets
Deploying a Simple Stateful Database
Creating a TCP Load Balancer by Using Services
Using Ingress to Route Traffic to a Static File Server
Parameterizing Your Application by Using Helm
Deploying Services Best Practices
Summary -
Developer Workflows
Goals
Building a Development Cluster
Setting Up a Shared Cluster for Multiple Developers
Enabling Developer Workflows
Initial Setup
Enabling Active Development
Enabling Testing and Debugging
Setting Up a Development Environment Best Practices
Summary -
Monitoring and Logging in Kubernetes
Metrics Versus Logs
Monitoring Techniques
Monitoring Patterns
Kubernetes Metrics Overview
What Metrics Do I Monitor?
Monitoring Tools
Monitoring Kubernetes Using Prometheus
Logging Overview
Tools for Logging
Logging by Using an EFK Stack
Alerting
Best Practices for Monitoring, Logging, and Alerting
Summary -
Configuration, Secrets, and RBAC
Configuration Through ConfigMaps and Secrets
Common Best Practices for the ConfigMap and Secrets APIs
RBAC
Summary -
Continuous Integration, Testing, and Deployment
Version Control
Continuous Integration
Testing
Container Builds
Container Image Tagging
Continuous Deployment
Deployment Strategies
Testing in Production
Setting Up a Pipeline and Performing a Chaos Experiment
Best Practices for CI/CD
Summary -
Versioning, Releases, and Rollouts
Versioning
Releases
Rollouts
Putting It All Together
Summary -
Worldwide Application Distribution and Staging
Distributing Your Image
Parameterizing Your Deployment
Load-Balancing Traffic Around the World
Reliably Rolling Out Software Around the World
When Something Goes Wrong
Worldwide Rollout Best Practices
Summary -
Resource Management
Kubernetes Scheduler
Advanced Scheduling Techniques
Pod Resource Management
Resource Management Best Practices
Summary -
Networking, Network Security, and Service Mesh
Kubernetes Network Principles
Network Plug-ins
Services in Kubernetes
Network Security Policy
Service Meshes
Summary -
Pod and Container Security
PodSecurityPolicy API
Workload Isolation and RuntimeClass
Other Pod and Container Security Considerations
Summary -
Policy and Governance for Your Cluster
Why Policy and Governance Are Important
How Is This Policy Different?
Cloud-Native Policy Engine
Introducing Gatekeeper
Audit
Policy and Governance Best Practices
Summary -
Managing Multiple Clusters
Why Multiple Clusters?
Multicluster Design Concerns
Managing Multiple Cluster Deployments
The GitOps Approach to Managing Clusters
Multicluster Management Tools
Kubernetes Federation
Managing Multiple Clusters Best Practices
Summary -
Integrating External Services and Kubernetes
Importing Services into Kubernetes
Exporting Services from Kubernetes
Sharing Services Between Kubernetes
Third-Party Tools
Connecting Cluster and External Services Best Practices
Summary -
Running Machine Learning in Kubernetes
Why Is Kubernetes Great for Machine Learning?
Machine Learning Workflow
Machine Learning for Kubernetes Cluster Admins
Data Scientist Concerns
Machine Leaning on Kubernetes Best Practices
Summary -
Building Higher-Level Application Patterns on Top of Kubernetes
Approaches to Developing Higher-Level Abstractions
Extending Kubernetes
Design Considerations When Building Platforms
Building Application Platforms Best Practices
Summary -
Managing State and Stateful Applications
Volumes and Volume Mounts
Kubernetes Storage
Stateful Applications
Summary -
Admission Control and Authorization
Admission Control
Authorization
Summary -
Conclusion
Index
- 原文作者:黄忠德
- 原文链接:https://huangzhongde.cn/post/2020-02-23-Kubernetes_Best_Practices/
- 版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议进行许可,非商业转载请注明出处(作者,原文链接),商业转载请联系作者获得授权。