Slide 1

Slide 1 text

©2021 VMware, Inc. ClusterAPI を使って Kubernetes のライフ サイクルを管理しよう 伊藤 忠司 ヴイエムウェア株式会社

Slide 2

Slide 2 text

©2021 VMware, Inc. 1 ⾃⼰紹介 l ⽒名: 伊藤 忠司 l 所属: VMware モダンアプリケーション プラットフォーム事業本部 l やってきた事 l メインフレーム︓6年 l エンタープライズストレージ︓6年 l コンテナ︓2年 l Kubernetes 周りで習得したい事 l セキュリティ周り

Slide 3

Slide 3 text

©2021 VMware, Inc. 2 l 想定している視聴者の⽅ l Kubernetes(K8s) クラスタのライフサイクル管理についてあれこれ考えている⽅ l インフラストラクチャを跨いで統⼀的なK8s ライフサイクル管理を検討している⽅ Cluster API 初⼼者の⽅向けのセッションになっています 本セッションの想定視聴者の⽅

Slide 4

Slide 4 text

©2021 VMware, Inc. Agenda 3 Cluster API が登場した背景 Cluster API 概要 Cluster API アーキテクチャ (宣伝) Cluster API を⽤いた エンタープライズグレード Kubernetes ランタイム まとめ

Slide 5

Slide 5 text

©2021 VMware, Inc. Agenda 4 Cluster API が登場した背景 Cluster API 概要 Cluster API アーキテクチャ (宣伝) Cluster API を⽤いた エンタープライズグレード Kubernetes ランタイム まとめ

Slide 6

Slide 6 text

©2021 VMware, Inc. 5 67 47 20 134 = + +

Slide 7

Slide 7 text

©2021 VMware, Inc. 6 エコシステムの成⻑と共に多くの選択肢 Kubernetes ランタイム数とインストーラ数* 67 47 20 134 = * CNCF Software conformance (Certified Kubernetes) as.of.2021.2.14 + + Certified Kubernetes - Distribution Certified Kubernetes - Hosted Certified Kubernetes - Installer

Slide 8

Slide 8 text

©2021 VMware, Inc. 7 l インフラストラクチャ • ネットワーク • ファイアーウォールルール • サーバ • ロードバランサ etc l Kubernetes コンポーネント l アドオン • バックアップ&リストア • Ingress • レジストリ • etc Kubernetes クラスタを作るには何が必要か︖︖︖ Kubernetes クラスタのコンポーネント

Slide 9

Slide 9 text

©2021 VMware, Inc. 8 l インフラストラクチャ • ネットワーク • ファイアーウォールルール • サーバ • ロードバランサ etc l Kubernetes コンポーネント l アドオン • バックアップ&リストア • Ingress • レジストリ • etc Kubernetes クラスタを作るには何が必要か︖︖︖ Kubernetes クラスタのコンポーネント

Slide 10

Slide 10 text

©2021 VMware, Inc. 9 § コントロールプレーン コンポーネント § kube-apiserver § etcd § kube-scheduler § kube-controller-manager § cloud-controller-manager § ノード コンポーネント § kubelet § kube-proxy § container runtime § アドオン Kubernetes コンポーネント

Slide 11

Slide 11 text

©2021 VMware, Inc. 10 § コントロールプレーン コンポーネント § kube-apiserver § etcd § kube-scheduler § kube-controller-manager § cloud-controller-manager § ノード コンポーネント § kubelet § kube-proxy § container runtime § アドオン Kubernetes コンポーネントのブートストラップ

Slide 12

Slide 12 text

©2021 VMware, Inc. 11 § コントロールプレーン コンポーネント § kube-apiserver § etcd § kube-scheduler § kube-controller-manager § cloud-controller-manager § ノード コンポーネント § kubelet § kube-proxy § container runtime § アドオン Kubernetes コンポーネントのブートストラップ

Slide 13

Slide 13 text

©2021 VMware, Inc. 12 l インフラストラクチャ • ネットワーク • ファイアーウォールルール • サーバ • ロードバランサ l Kubernetes コンポーネント l アドオン • バックアップ&リストア • Ingress • レジストリ • etc Kubernetes クラスタのライフサイクル管理においては、インフラ部分含めて検討が必要 Kubernetes クラスタのコンポーネント

Slide 14

Slide 14 text

©2021 VMware, Inc. Agenda 13 Cluster API が登場した背景 Cluster API 概要 Cluster API アーキテクチャ (宣伝) Cluster API を⽤いた エンタープライズグレード Kubernetes ランタイム まとめ

Slide 15

Slide 15 text

©2021 VMware, Inc. 14 l Cluster API とは l Kubernetes クラスタライフサイクル管理の仕組 l Cluster API で出来る事 l 仮想マシン、ネットワーク、ストレージ部分を含めた Kubernetes クラスタの作成、削除 l スケールアップ、スケールアウト l ノードの死活監視 l アップグレード l SIG で管理されているオープンな仕組み l github.com/kubernetes-sigs/cluster-api Cluster API 宣⾔的Kubernetes クラスタライフサイクル管理 It's Kubernetes all the way down Clusters as Cattle

Slide 16

Slide 16 text

©2021 VMware, Inc. 15 概要 Cluster API マネジメントクラスタ K8s クラスタのマニフェストファイル Cluster: Dev ControlPlane: KubeadmControlPlane MachineDeployment: Mix of Small/Large VMs ユーザー Cluster API Kubernetes Cluster Kubernetes Nodes Kubernetes Nodes Kubernetes Nodes Kubernetes Nodes Kubernetes Nodes Other Clouds YAML ワークロードクラスタ

Slide 17

Slide 17 text

©2021 VMware, Inc. 16 概要 Cluster API マネジメントクラスタ Cluster API Kubernetes Cluster Kubernetes Nodes Kubernetes Nodes Kubernetes Nodes Kubernetes Nodes Kubernetes Nodes Other Clouds Kubernetes の仕組みを活⽤し、Kubernetes クラスタの ライフサイクルを管理する仕組み ワークロードクラスタ ブートストラップクラスタ

Slide 18

Slide 18 text

©2021 VMware, Inc. Agenda 17 Cluster API が登場した背景 Cluster API 概要 Cluster API アーキテクチャ (宣伝) Cluster API を⽤いた エンタープライズグレード Kubernetes ランタイム まとめ

Slide 19

Slide 19 text

©2021 VMware, Inc. 18 Kubernetes リソースとの対⽐ Cluster API Kubernetes Pod ReplicaSet Deployment Cluster API Cluster Machine ControlPlane CP MachineSet MachineDeployment

Slide 20

Slide 20 text

©2021 VMware, Inc. 19 現在のアーキテクチャ Cluster API マネジメントクラスタ Cluster API Provider Cluster API Controller Manager Reconcile InfraCluster Controller Infrastructure Controller Manager Provider Reconcile InfraMachine Controller Reconcile BootstrapConfig Controller Bootstrap Controller Manager Reconcile ControlPlane Controller ControlPlane Controller Manager CAPI Provider Provider Cluster Machine MachineSet MachineDeployment

Slide 21

Slide 21 text

©2021 VMware, Inc. 20 ワークフロー Cluster API を⽤いた Kubernetes クラスタの作成 1. ブートストラップクラスタの作成(ex. kind) ブートストラップクラスタ(ex. kind) ユーザー $ kind create cluster

Slide 22

Slide 22 text

©2021 VMware, Inc. 21 ワークフロー Cluster API を⽤いた Kubernetes クラスタの作成 1. ブートストラップクラスタの作成(ex. kind) 2. ブートストラップクラスタに対して、Cluster API、コントローラ、インフラストラクチャ プロバイダ固有のリソースをインストール ブートストラップクラスタ(ex. kind) ユーザー $ clusterctl init

Slide 23

Slide 23 text

©2021 VMware, Inc. 22 ワークフロー Cluster API を⽤いた Kubernetes クラスタの作成 1. ブートストラップクラスタの作成(ex. kind) 2. ブートストラップクラスタに対して、Cluster API、コントローラ、インフラストラクチャ プロバイダ固有のリソースをインストール マネジメントクラスタ ユーザー Control Plane Cluster A ControlPlane A Cluster Controller ControlPlane Controller $ clusterctl init

Slide 24

Slide 24 text

©2021 VMware, Inc. 23 ワークフロー Cluster API を⽤いた Kubernetes クラスタの作成 1. ブートストラップクラスタの作成(ex. kind) 2. ブートストラップクラスタに対して、Cluster API、コントローラ、インフラストラクチャ プロバイダ固有のリソースをインストール 3. ワークロードクラスタ⽤のマニフェストファ イル を作成 マネジメントクラスタ ユーザー Control Plane Cluster A ControlPlane A Cluster Controller ControlPlane Controller $ clusterctl config YAML

Slide 25

Slide 25 text

©2021 VMware, Inc. 24 ワークフロー Cluster API を⽤いた Kubernetes クラスタの作成 1. ブートストラップクラスタの作成(ex. kind) 2. ブートストラップクラスタに対して、Cluster API、コントローラ、インフラストラクチャ プロバイダ固有のリソースをインストール 3. ワークロードクラスタ⽤のマニフェストファ イル を作成 4. ワークロードクラスタのマニフェストファイ ルに基づいて、K8s クラスタを作成 マネジメントクラスタ ユーザー Control Plane Cluster A ControlPlane A Cluster Controller ControlPlane Controller YAML $ kubectl apply -f ワークロードクラスタ

Slide 26

Slide 26 text

©2021 VMware, Inc. 25 ワークフロー Cluster API を⽤いた Kubernetes クラスタの作成 1. ブートストラップクラスタの作成(ex. kind) 2. ブートストラップクラスタに対して、Cluster API、コントローラ、インフラストラクチャ プロバイダ固有のリソースをインストール 3. ワークロードクラスタ⽤のマニフェストファ イル を作成 4. ワークロードクラスタのマニフェストファイ ルに基づいて、K8s クラスタを作成 5. 作成後は、ワークロードクラスタは通常の Kubernetes クラスタと同様直接操作 マネジメントクラスタ ユーザー Control Plane Cluster A ControlPlane A Cluster Controller ControlPlane Controller ワークロードクラスタ $ kubectl

Slide 27

Slide 27 text

26 ©2021 VMware, Inc. Demo

Slide 28

Slide 28 text

©2021 VMware, Inc. 27 Azure 環境上にワークロードクラスタを作成 Demo マネジメントクラスタ ワークロードクラスタ in Azure ライフサイクル管理 • Kubernetes クラスタの作成 K8s v1.18.8

Slide 29

Slide 29 text

©2021 VMware, Inc. 28

Slide 30

Slide 30 text

©2021 VMware, Inc. 29 Azure 環境上に作成したワークロードクラスタのスケールアウト/アップグレード Demo マネジメントクラスタ ワークロードクラスタ in Azure K8s v1.19.1 ライフサイクル管理 • Worker ノードのスケールアウト • Kubernetes クラスタのバージョンアップ

Slide 31

Slide 31 text

©2021 VMware, Inc. 30

Slide 32

Slide 32 text

©2021 VMware, Inc. Agenda 31 Cluster API が登場した背景 Cluster API 概要 Cluster API アーキテクチャ (宣伝) Cluster API を⽤いた エンタープライズグレード Kubernetes ランタイム まとめ

Slide 33

Slide 33 text

©2021 VMware, Inc. 32 エンタープライズCluster API K8s ランタイム Tanzu Kubernetes Grid = TKG

Slide 34

Slide 34 text

©2021 VMware, Inc. 33 エンタープライズCluster API K8s ランタイム Tanzu Kubernetes Grid = TKG

Slide 35

Slide 35 text

©2021 VMware, Inc. 34 エンタープライズCluster API K8s ランタイム Tanzu Kubernetes Grid = TKG vSphere with Tanzu Tanzu Kubernetes Grid = TKG vSphere 6.7u3/7 パブリッククラウド (AWS/Azure/VMC on AWS) Tanzu というKubernetes を中⼼としたソリューションの中で Kubernetes ランタイム部分を提供 vSphere とインテグレーションされた組み込 み型 Kubernetes ランタイムを提供 アプライアンス型として、マルチIaaS 環境で 利⽤出来るKubernetes ランタイムを提供 TKG multicloud

Slide 36

Slide 36 text

©2021 VMware, Inc. Agenda 35 Cluster API が登場した背景 Cluster API 概要 Cluster API アーキテクチャ (宣伝) Cluster API を⽤いた エンタープライズグレード Kubernetes ランタイム まとめ

Slide 37

Slide 37 text

©2021 VMware, Inc. 36 Cluster API を利⽤する事によって・・・ l IaaS 環境を跨いだ統⼀的なKubernetes クラスタのライフサイクル管理が可能 • K8s クラスタの作成/削除 • スケールアウト、スケールアップ • アップグレード • ノードの死活監視 l Kubernetes クラスタのDay1/2 オペレーションが統⼀され、多くのKubernetes クラ スタを効率良く管理する事が可能 まとめ

Slide 38

Slide 38 text

ご清聴、ありがとうございました ©2021 VMware, Inc.