Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
ccnr-ops-2021-1st
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
capsmalt
March 26, 2021
Technology
230
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ccnr-ops-2021-1st
CCNR Ops 2021 前半部分
capsmalt
March 26, 2021
More Decks by capsmalt
See All by capsmalt
OpenShift.Run2023_Overview
capsmalt
0
210
ccnr-ops-2021-1st-appendix
capsmalt
1
250
5min_operator101
capsmalt
1
620
EDB2020_Red Hat
capsmalt
0
400
OpenShift.Run Intro
capsmalt
0
190
kubernetes2020
capsmalt
1
820
Operator 101
capsmalt
5
3.5k
Operator Basic in CNDK2019
capsmalt
6
1.5k
GitOps_Kubernetes
capsmalt
1
870
Other Decks in Technology
See All in Technology
cdkd (CDK Direct)
gotok365
4
280
セキュリティ専任チームなしで攻撃を先回りするSREが実践したSIEM on Amazon OpenSearch Service
cscengineer
PRO
1
720
AI Agent 時代のデータ基盤: ClickHouse で実現する 超高速分析とコスト削減の両立
jozono
0
220
バックオフィスに染み出すTypeScript ── clasp で安全に仕組みを作る
nealle
1
200
Cloudflareの向き先
chimame
1
150
AI時代の組織作り:チーム開発から「個人×AI」への移行と、持続可能な「開発資本」の築き方
ham0215
2
420
AX時代の自治体支援リソース再配分と役割分担の再構成:戦略とロードマップ(概要)
sishi2026
0
210
なぜ東京にいる私が、新潟の技術コミュニティを運営するのか by 八雲慎之助
yakumo
0
230
Microsoft Entra Kerberos で実現するクラウド デバイス管理
tamaiyutaro
2
660
現場を動かすAIエージェント#2_製造業現場でのAI活用から見た、ハマる罠と実践知
kintotechdev
2
210
FinOpsを導入してマルチプロダクトのコスト最適化を実現する
kworkdev
PRO
0
140
AI時代における医療情報システムのセキュリティ / Security of Healthcare IT Systems in the AI Era
henryofficial
0
130
Featured
See All Featured
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
3k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
23k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
280
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
660
Ethics towards AI in product and experience design
skipperchong
2
460
Deep Space Network (abreviated)
tonyrice
0
410
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
770
Documentation Writing (for coders)
carmenintech
77
5.6k
Transcript
CCNR Ops 2021 – 前半 Red Hat K.K. Cloud Solution
Architect 1
CCNR Ops ハンズオン - 前半 - OpenShift Basic ・Console, CLI(oc)
・Project(Namespace), K8s Resources ・Build and Deploy - Operator Basic (Prometheus) ・Deploy Java apps ・Deploy own Prometheus Operator ・Get Metrics using JMX Exporter 後ほどハンズオン概要を紹介します
OpenShift 101 Red Hat K.K. Cloud Solution Architect 3
サマリー︓ OpenShift とは︖ OpenShift 4
OperatorでK8s⾃体,K8s周辺をフルカバー 運⽤プロセスを含めたポータビリティの実現。コンテナ/Kubernetesシステムを,K8sの技術を活⽤した付加価値機能によって⾃律運⽤を⽀援。 AUTOMATED OPERATIONS CLUSTER SERVICES APPLICATION SERVICES DEVELOPER SERVICES
Middleware, Service Mesh Functions, ISV Monitoring, Chargeback Registry, Logging Automated Builds, CI/CD, IDE Any Infrastructure どの環境でも,迅速か つ信頼性の⾼いOS どの環境でも,同様の ⼿順でアプリケーショ ンを稼働 どの環境でも,⾃動化 された運⽤プロセスを 実現 Virtual Private cloud Bare metal Public cloud Edge OpenShiftは,Kubernetesを使いこなせるように 5
Kubernetesの Value Declarative Configuration Self-Healing Auto Scaling リソースの抽象化 ⾃⼰回復性 ⾃動スケーリング
クラウドプロバイダごとに 異なる実装やサービスの詳細 を知る必要がなく, Kubernetesは開発者を特定の インフラ依存から開放します。 クラウド上で⾼度なポータ ビリティを担保できます。 Kubernetesは,現在のシス テム状態が望ましい状態に⼀ 致するように動作します。 はじめにシステムを初期化 するだけでなく,その後も継 続的にシステムが不安定に なった場合や,信頼性に影響 を及ぼす障害時に,もとの状 態に動的に戻します。 迅速で簡単なロールバック で,信頼性の⾼い頻繁なコン テナイメージのビルドとデプ ロイを提供します。 Web ベースのサービスは数 時間ごとに機能改善されるこ とが珍しくなく,新しいコン ポーネントや機能を開発しデ プロイできます。 6
Node Node Node Node リソースの抽象化 Declarative Configuration apiVersion: apps/v1 kind:
Deployment metadata: name: test-nginx #コンテナの名前 spec: selector: matchLabels: app: nginx #テンプレートを指定 replicas: 3 #レプリカ数(Podの数) template: #作成されるPodのテンプレート metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:latest ports: - containerPort: 80 #ポート番号 クラウドプロバイダごとに異なる実装やサービスの詳細を知る必要がなく, 宣⾔的にインフラリソースを管理できます。 Deploy Infra Resources Declarative Configuration 7
Node Node Node Node ⾃⼰回復性 Self-H ealing Kubernetesは,現在のシステム状態が望ましい状態に⼀致するように動作します。 Replicas =
3 Replicas = 4 Auto-Healing Node Error 望ましい状態(設定した値) 起動状態(稼働している値) Self-Healing 8
⾃動スケーリング Auto Scaling Node Node Node Auto Scale Load Balancer
動的に負荷状況に応じたスケールアウトや,不要なリソースを縮退します。 Auto Scaling 9
CONTAINER 10 まずはコンテナ
BINARY RUNTIME CONTAINER IMAGE 11
IMAGE REGISTRY CONTAINER IMAGE IMAGE IMAGE IMAGE IMAGE IMAGE 12
IMAGE REGISTRY frontend:latest frontend:2.0 frontend:1.1 frontend:1.0 mongo:latest mongo:3.7 mongo:3.6 mongo:3.4
myregistry/frontend myregistry/mongo IMAGE IMAGE IMAGE IMAGE IMAGE IMAGE IMAGE IMAGE 13
POD CONTAINER 10.140.4.44 POD CONTAINER 10.15.6.55 CONTAINER 14 ここからKubernetes
image name replicas labels cpu memory storage ReplicaSet ReplicationController POD
CONTAINER POD CONTAINER ... POD CONTAINER 1 2 N 15
image name replicas labels version strategy Deployment DeploymentConfig POD CONTAINER
POD CONTAINER v1 v2 16
foo = bar Node image name replicas labels cpu memory
storage DaemonSet foo = bar Node foo = baz Node POD CONTAINER POD CONTAINER ✓ ✓ 17
Dev appconfig.conf MYCONFIG=true ConfigMap POD CONTAINER Prod appconfig.conf MYCONFIG=false ConfigMap
POD CONTAINER 18
Dev hash.pw ZGV2Cg== ConfigMap POD CONTAINER Prod hash.pw cHJvZAo= ConfigMap
POD CONTAINER 19
POD SERVICE “backend” CONTAINER 10.110.1.11 role: backend POD CONTAINER 10.120.2.22
role: backend POD CONTAINER 10.130.3.33 role: backend POD CONTAINER 10.140.4.44 role: frontend role: backend 20
POD SERVICE “backend” CONTAINER 10.110.1.11 role: backend POD CONTAINER 10.120.2.22
role: backend POD CONTAINER 10.130.3.33 role: backend POD CONTAINER 10.140.4.44 role: frontend role: backend 21
PAYMENT DEV PAYMENT PROD CATALOG INVENTORY ❌ ❌ ❌ POD
C POD C POD C POD C POD C POD C POD C POD C POD C POD C POD C POD C 22
EXISTING AUTOMATION TOOLSETS SCM (GIT) CI/CD WORKER MASTER Red Hat®
OpenShift® services STORAGE Kubernetes services Monitoring | Logging | Tuned SDN | DNS | Kubelet Infrastructure services etcd NETWORK COMPUTE Registry Prometheus | Grafana Alertmanager Kibana | Elasticsearch Router Developers Admins WORKER Monitoring | Logging | Tuned SDN | DNS | Kubelet Registry Prometheus | Grafana Alertmanager Kibana | Elasticsearch Router 23 OpenShift アーキテクチャ概要
24 STORAGE NETWORK COMPUTE
25 Worker Node (ワークロード) WORKER STORAGE NETWORK COMPUTE WORKER
26 Master Node (コントロールプレーン) MASTER STORAGE NETWORK COMPUTE
27 etcd (全ステートの維持・管理) MASTER STORAGE etcd NETWORK COMPUTE
28 Kubernetes Core コンポーネント MASTER STORAGE Kubernetes services etcd NETWORK
COMPUTE Kubernetes API server Scheduler Cluster Management
29 OpenShift Core コンポーネント MASTER OpenShift services STORAGE Kubernetes services
etcd NETWORK COMPUTE OpenShift API server Operator Lifecycle Management Web Console
30 インフラサービス MASTER OpenShift Services STORAGE Kubernetes services Infrastructure services
etcd NETWORK COMPUTE Monitoring | Logging | Tuned | SDN | DNS | Kubelet
31 WORKER MASTER OpenShift Services STORAGE Kubernetes services Monitoring |
Logging | Tuned SDN | DNS | Kubelet Infrastructure services etcd NETWORK COMPUTE WORKER Monitoring | Logging | Tuned SDN | DNS | Kubelet インフラサービス
32 統合イメージレジストリ WORKER MASTER OpenShift Services STORAGE Kubernetes services Monitoring
| Logging | Tuned SDN | DNS | Kubelet Infrastructure services etcd NETWORK COMPUTE Registry WORKER Monitoring | Logging | Tuned SDN | DNS | Kubelet Registry
33 クラスターモニタリング WORKER MASTER OpenShift Services STORAGE Kubernetes services Monitoring
| Logging | Tuned SDN | DNS | Kubelet Infrastructure services etcd NETWORK COMPUTE Registry Prometheus | Grafana Alertmanager WORKER Monitoring | Logging | Tuned SDN | DNS | Kubelet Registry Prometheus | Grafana Alertmanager
34 ロギング WORKER MASTER OpenShift Services STORAGE Kubernetes services Monitoring
| Logging | Tuned SDN | DNS | Kubelet Infrastructure services etcd NETWORK COMPUTE Registry Prometheus | Grafana Alertmanager Kibana | Elasticsearch WORKER Monitoring | Logging | Tuned SDN | DNS | Kubelet Registry Prometheus | Grafana Alertmanager Kibana | Elasticsearch
35 ルーティング WORKER MASTER OpenShift Services STORAGE Kubernetes services Monitoring
| Logging | Tuned SDN | DNS | Kubelet Infrastructure services etcd NETWORK COMPUTE Registry Prometheus | Grafana Alertmanager Kibana | Elasticsearch Router WORKER Monitoring | Logging | Tuned SDN | DNS | Kubelet Registry Prometheus | Grafana Alertmanager Kibana | Elasticsearch Router
36 コンソール,CLI,IDE EXISTING AUTOMATION TOOLSETS SCM (GIT) CI/CD WORKER MASTER
OpenShift Services STORAGE Kubernetes services Monitoring | Logging | Tuned SDN | DNS | Kubelet Infrastructure services etcd NETWORK COMPUTE Registry Prometheus | Grafana Alertmanager Kibana | Elasticsearch Router Developers Admins WORKER Monitoring | Logging | Tuned SDN | DNS | Kubelet Registry Prometheus | Grafana Alertmanager Kibana | Elasticsearch Router
Kubernetes が提供する機能 Kubernetes is Container Orchestration Cluster services monitoring, showback,
registry, logging Application services middleware, functions, ISV Service mesh Developer services dev tools, automated builds, CI/CD, IDE Automated operations Linux OS Physical Virtual Private Public Any infrastructure certified コンテナオーケストレーション クラスタ上でコンテナをスケジューリングして実⾏するための プラットフォーム - 複数のホストにわたるコンテナのオーケストレーション - 適切なインフラリソースを効率よく配置 - アプリケーションのデプロイとアップデートを⾃動化 - ステートフルなアプリケーションのためのストレージの管理 - コンテナ化されたアプリケーションとそのリソースの迅速な スケーリング - サービスを宣⾔的に管理 - ⾃動再起動,⾃動スケーリングにより,アプリケーションの ヘルスチェックと⾃⼰修復を⾏う Declarative Configuration Auto Scaling Self-Healing https://www.redhat.com/ja/topics/containers/what-is-kubernetes 参考) 37
OpenShift が提供する機能 OpenShift accelerates Enterprise Kubernetes Cluster services monitoring, showback,
registry, logging Application services middleware, functions, ISV Service mesh Developer services dev tools, automated builds, CI/CD, IDE Automated operations Enterprise Linux CoreOS Physical Virtual Private Public Any infrastructure certified Enterprise Kubernetes コンテナアプリの本番適用 CNCFに⽀援されるコミュニティプロジェクトや,パートナーのより広範な エコシステムと連携し,どのクラウド上でも同じ運⽤⽅法で,コンテナアプ リケーションを⾃由に管理できる。 信頼されたKubernetes管理 CoreOS社との統合により,CoreOSやRHEL8をコアとした信頼できる 基盤を利⽤し,ハイブリッドクラウド全体のライフサイクル管理を提供。⾼ 度なセキュリティと監査,可能性,管理のしやすさなどのユーザー体験を 可能にする。 38
Automated operations Enterprise Linux CoreOS コンテナアプリの本番適⽤ Cluster Services クラスタ管理を容易にし,運⽤業務を⾃動化するサービス Physical
Virtual Private Public Any infrastructure Developer Services 開発者がコンテナアプリケーション開発に集中できる環境を整え るサービス Cluster services monitoring, showback, registry, logging Application services middleware, functions, ISV Service mesh Developer services dev tools, automated builds, CI/CD, IDE certified Application Services マイクロサービス間の連携やファンクションサービスを実現を⽀援 するサービス Logging Registry Monitoring ISV Middleware Function Service ServiceMesh IDE CI/CD Developer Tools チームがスピード,アジリティに⾃信を持って ビルドできる環境を提供。クラウドネイティブ な開発を本番へのコード作成を⽀援。 Build fast. Ship first. 39
Automated operations 堅牢化されたコンテナ実⾏環境 Kubernetes デファクトスタンダードなコンテナオーケストレーション Installation Configuration Cluster Scalability Cluster
Upgrade Security GUI Network Enterprise Linux CoreOS Physical Virtual Private Public Any infrastructure certified Cluster Management ⾼度なセキュリティと監査,可⽤性,管理の容易性 Cluster services monitoring, showback, registry, logging Application services middleware, functions, ISV Service mesh Developer services dev tools, automated builds, CI/CD, IDE Declarative Configuration Self-Healing Auto Scaling コンテナスタックのあらゆるレベルとアプリ ケーションライフサイクル全体のセキュリティ に重点を置いている。 Trust with Red Hat. 40
⾃律化するシステム運⽤ Operatorによる運⽤の⾃律化 Full-Lifecycle Deep Insights Auto Pilot いままで⼈が対応してきた障害対応を⾃律的に回復する Manage with
simplicity. App lifecycle Storage lifecycle - Backup - Failure Recovery Processing and workload analysis - Metrics - Alerts - Logging Horizontal/Vertical Scaling - Auto config - Auto tuning - Abnormal detection - scheduling tuning 41
What’s Operator An Operator is a method of packaging, deploying
and managing a Kubernetes application Kubernetes Applications 運⽤の知⾒をコード化し,アプリやK8sクラスターの運⽤を⾃動化する アプリ運⽤における運⽤の知⾒をコード化し, パッケージ化したもの。 アプリケーション運⽤に必要な以下のような 作業を⾃動的に⾏う。 ・インストール ・リソーススケーリング ・バックアップ ・アップデート 運⽤の知⾒をコード化 Operator - Installation - Backup - Monitoring 42
Kubernetes ⾃体ではできない運⽤︓ ⾊々なソフトウェアスタックの運⽤ 43
Kubernetes ⾃体ではできない運⽤︓ Kubernetes クラスターの維持管理 o クラスター作成,削除,変更 o バージョンアップ o ノードの拡張・縮退
o ホストOSアップデート o 証明書管理 o 認証認可ユーザー管理 o 障害時のノード復旧 o … o … o etc. 1.16 1.17 1.18 44
Reconciliation Loop Custom Resource Definition & Custom Controller Custom Controller
Custom Resource Definition Deploy CRD Watch StatefulSet ConfigMap Pod Pod Service Actions (Operational Knowledge) Custom Controller Custom Resource Definition Operator = + (Resources) Kubernetes Operator 45
Postgres Operator (Crunchy Data) 出典: Crunchy Data Solutions, Inc. https://www.crunchydata.com/.
※商標はCrunchy Data Solutions, Incに基づきます。 postgres-operator ・レプリケーションクラスタのPostgreSQLコンテナの配備 ・レプリカ設定のPostgreSQLクラスタをスケールアップ ・pgpoolとmetricsサイドカーをPostgreSQLクラスタに追加 ・PostgreSQLクラスタにSQLポリシーを適⽤ ・PostgreSQLクラスタにメタデータタグの割り当て ・PostgreSQLのユーザとパスワードを維持 ・PostgreSQLクラスタの マイナー/メジャーアップグレードの実施 ・CSVやJSONファイルをPostgreSQLにロード ・データベースのバックアップの実⾏ Manual Operation(pgo) Auto Operation 必須コンポーネント Operatorが状態に応じて 展開するコンポーネント Crunchy Data is the Trusted Open Source Enterprise PostgreSQL 46
創る 活⽤する or Kubernetes Platform 動向を知った上で, リーズナブルな選択を。 47
Happy Kubernetes Life ^ Please Follow me :) 48 @capsmalt