Kubernetes Programming with Go: Programming Kubernetes Clients and Operators Using Go and the Kubernetes API

Martin, Philippe

  • 出版商: Apress
  • 出版日期: 2022-12-25
  • 售價: $2,330
  • 貴賓價: 9.5$2,214
  • 語言: 英文
  • 頁數: 297
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 1484290259
  • ISBN-13: 9781484290255
  • 相關分類: Go 程式語言Kubernetes
  • 海外代購書籍(需單獨結帳)

商品描述

This book begins by introducing the structure of the Kubernetes API and which operations it serves. Following chapters demonstrate how to write native Kubernetes resources definitions using Go structures defined in the API and API Machinery libraries. Miscellaneous utilities are described to help you work with different resource fields and to convert your resource definitions to or from YAML or JSON. Next, you will learn how to interact with the Kubernetes API server to create, delete, update, and monitor resources in a cluster using the client-go library. A complete chapter is devoted to tools provided to test your programs using the client-go library. An example follows to wrap up the first part of the book, describing how to write a kubectl plugin. Next, you will learn how to extend the Kubernetes API using Custom Resource Definitions, and how to write Kubernetes resources in a generic way as well as how to create your own resources using the unstructured concept. The next chapters delve into the controller-runtime library, useful for extending Kubernetes by writing operators, and the kubebuilder framework, which leverages this library, to help you start writing operators in minutes.

After reading this book, you will have a deep understanding of the Kubernetes API's structure and how Kubernetes resources are organized within it, and have at your disposal a complete toolbox to help you write Kubernetes clients and operators.

What You Will Learn

  • Understand how the Kubernetes API and its resources are organized
  • Write Kubernetes resources in Go
  • Create resources in a cluster
  • Leverage your newly-gained knowledge to write Kubernetes clients and operators

Who is this Book for:

Software engineers and (Site Reliability Engineers) SREs wishing to write Kubernetes clients and operators using the Go language.

商品描述(中文翻譯)

本書首先介紹了Kubernetes API的結構以及它提供的操作。接下來的章節演示了如何使用在API和API Machinery庫中定義的Go結構來編寫原生的Kubernetes資源定義。書中還介紹了各種實用工具,幫助您處理不同的資源字段,並將資源定義轉換為YAML或JSON格式。接著,您將學習如何使用client-go庫與Kubernetes API服務器進行交互,在集群中創建、刪除、更新和監控資源。書中還專門介紹了使用client-go庫進行程序測試的工具。書的第一部分以一個示例結束,描述了如何編寫一個kubectl插件。接下來,您將學習如何使用自定義資源定義擴展Kubernetes API,以及如何以通用方式編寫Kubernetes資源,以及如何使用非結構化概念創建自己的資源。接下來的章節深入介紹了controller-runtime庫,該庫可通過編寫運算元來擴展Kubernetes,以及kubebuilder框架,該框架利用controller-runtime庫,幫助您在幾分鐘內開始編寫運算元。閱讀本書後,您將深入了解Kubernetes API的結構以及Kubernetes資源在其中的組織方式,並且擁有一個完整的工具箱,幫助您編寫Kubernetes客戶端和運算元。

您將學到什麼:
- 瞭解Kubernetes API及其資源的組織方式
- 使用Go語言編寫Kubernetes資源
- 在集群中創建資源
- 利用您新獲得的知識來編寫Kubernetes客戶端和運算元

適合閱讀本書的讀者:
希望使用Go語言編寫Kubernetes客戶端和運算元的軟體工程師和SRE(Site Reliability Engineers)。

作者簡介

Philippe Martin has been working with Kubernetes for five years, first by creating an operator to deploy video CDNs into the cloud, later helping companies deploy their applications into Kubernetes, then writing a client to help developers work in a Kubernetes environment. Philippe passed the CKAD, CKA and CKS certifications.

He has long experience with distributed systems and open-source software: he started his career 20 years ago creating thin clients based on the Linux kernel and open source components. He is currently working at Red Hat on the Development Tools team.

Philippe is active in the development of Kubernetes, especially its documentation, and participates in the translation of the official documentation into French, has edited two reference books about the Kubernetes API and kubectl, and is responsible for the French translation of the Kubernetes Dashboard. He participated in Google Season of Docs to create the new Kubernetes API Reference section of the official documentation, and is maintaining it. He is currently participating in the Apps SIG, a group that covers deploying and operating applications in Kubernetes.

作者簡介(中文翻譯)

Philippe Martin在Kubernetes上工作已有五年之久,首先他創建了一個操作者(operator),將視頻CDN部署到雲端中,接著協助公司將他們的應用程式部署到Kubernetes上,然後撰寫了一個客戶端(client)來幫助開發人員在Kubernetes環境中工作。Philippe通過了CKAD、CKA和CKS的認證。他在分散式系統和開源軟體方面擁有豐富的經驗:他在20年前開始他的職業生涯時,創建了基於Linux核心和開源元件的瘦客戶端。他目前在紅帽公司的開發工具團隊工作。Philippe在Kubernetes的開發中非常活躍,特別是在其文件的撰寫方面,並參與將官方文件翻譯成法語,他編輯了兩本關於Kubernetes API和kubectl的參考書籍,並負責Kubernetes儀表板的法語翻譯。他參與了Google Season of Docs,為官方文件創建了新的Kubernetes API參考部分,並繼續維護該部分。他目前參與Apps SIG,這是一個負責在Kubernetes中部署和運營應用程式的小組。