SlideShare une entreprise Scribd logo
1  sur  21
2021/11/21 NTT DATA Yuji Shono / 正野 勇嗣
JJUG CCC 2021 Fall
JavaエンジニアがKubernetesでGitOpsに入門する
1
趣旨
このセッションを聴き終わったときに達成いただきたいこと
Javaエンジニアが
Javaフレームワークの技術は得意だが、コンテナ
やクラウドはこれからという方が、
Kubernetesで
クラウドネイティブ技術の一つであるKubernetes
の基礎を学びつつ、
GitOpsに入門する
Argo CDやFlux2といったCI/CDツールを題材に、
GitOpsが何かということを知って、学習意欲を高
める
2
About Me
クラウドイミグラント。オンプレ・Javaフレームワーク全盛時代からのJavaエンジニア
。
R&D
Javaフレームワーク、Eclipseプラグイン開発
新規R&Dの企画・技術目利き
現場
支援 大規模更改(金融/官公庁 等)、トラブルシューティング
正野 勇嗣(しょうの ゆうじ)
2005年修士卒 NTTデータ グローバル戦略室
Web記事・書籍執筆・講演
マイクロサービス、API、Kubernetes等
保有資格
クラウド、DBMS、OS、JavaEE等
10+年
5+年
教育 4年 大学非常勤講師「ソフトウェアエンジニアリング」
Agile
cloud
devops
MSA
3
目次
• なぜJavaエンジニアがk8sやGitOpsを学ぶのか
• Kubernetes
• GitOps
4
なぜJavaエンジニアが
k8sやGitOpsを学ぶのか
5
①技術の変遷
Category Lv.1 Lv.2 Lv.3 Lv.4
Mode Legacy Open Legacy Cloud Native/Digital
Lang COBOL C Java Better Java
Client 静的 動的 Mobile Edge/IoT
Server MF Open Cloud/Container
Process WF Agile Scaled Agile
Architecture Monolith Modular Monolith MSA
Deployment 手動 CI Ci/CD
運用 手動 NoOps
監視 Monitoring Observability
Logic Algorithm ML Model
Sizing in advance Just In Time
Skill Set 業務屋/基盤屋 Full Stack & Business
Javaを取り巻く環境は大きく変わった
自社・市場の技術変化スピードに合わせ、自らを変容していくことが求められ
る
6
②求められるスキル
インフラ領域にもソフトウェア開発のスキルが求められる
表:KubernetesやGitOpsに必要なスキル
スキル 概要 価値 代表ツール
A.宣言的
プログラミング
マニフェストにあるべき状態を
定義
if/elseなどの膨大な条件分岐の
回避
Kubernetes
B.DRYの原則
(Don't Repeat Yourself)
開発環境や本番環境間で設定を
共通化
仕様変更追従漏れの回避
Kubernetes
(Kustomize)
C.委譲 CDツールに処理を委譲
責務の分離 セキュリティリス
クの極小化
Argo CD, Flux2
D.イベントリスナ マニフェストの変更を検知し自
動デプロイ
Configuration Drift(構成の逸脱
)の回避
Argo CD, Flux2
7
Kubernetes
8
Kubernetes登場まで
仮想化のレイヤが上がってきている
仮想化Lv. 0 1 2 3 4
分類 仮想化無し ホストOS ハイパーバイザ コンテナ
オーケストレー
ション
代表製品 - VMWare Hyper-V Docker Kubernetes
レイ
ヤ
4 コンテナクラスタ ○
3 コンテナ ○ ○
2 ゲストOS ○ ○
1 ホストOS ○ ○ - ○ ○
管理単位: ○
9
レイヤが上がることの意味
システムの定義は抽象化(高級言語化)され、ソフトウェア開発のスキルが求められ
る
AP
ミドルウェア
OS
コンテナ
クラウドリソース
マニフェスト
オンプレ クラウド Kubernetes
抽象化
バラバラ 集約
10
Pod
Pod
Service
Kubernetesの仕組み ~A. 宣言的プログラミング~
システムのTobeをYAMLに宣言的に記述
Web AP
Web AP
ReplicaSet
LB
Rolling Update
Podの自動復旧
実行環境 運用作業
ルーティング コンテナの管理
https://news.mynavi.jp/itsearch/article/devsoft/4358
【連載】Kubernetes入門【第4回】Kubernetesの4つのリソース - Pod/ReplicaSet/Deployment/Service
YAML
Deployment
ToBe例:Replicaは2つ
※不足分は自動追加
11
複数環境の課題 ~B. DRY※の原則~
Kustomizeにより開発環境や本番環境間で設定を共通化
共通YAML
開発環境YAML 本番環境YAML
開発環境YAML 本番環境YAML
冗長な記述
→仕様変更追従漏れ誘発
共通化(DRY)
→メンテナンス容易性の向上
12
※Don’t Repeat Yourself:重複する記述を避ける
再掲: ②求められるスキル
インフラ領域にもソフトウェア開発のスキルが求められる
表:KubernetesやGitOpsに必要なスキル
スキル 概要 価値 代表ツール
A.宣言的
プログラミング
マニフェストにあるべき状態を
定義
if/elseなどの膨大な条件分岐の
回避
Kubernetes
B.DRYの原則
(Don't Repeat Yourself)
開発環境や本番環境間で設定を
共通化
仕様変更追従漏れの回避
Kubernetes
(Kustomize)
C.委譲 CDツールに処理を委譲
責務の分離 セキュリティリス
クの極小化
Argo CD, Flux2
D.イベントリスナ マニフェストの変更を検知し自
動デプロイ
Configuration Drift(構成の逸脱
)の回避
Argo CD, Flux2
13
GitOps
14
Why GitOps
アプリケーション開発(CI)と環境変更(CD)を混ぜて考えて良いのか?
• インフラがコード化され、CDが容
易に実現されるようになってきた
• 様々な開発・運用手法が実現され
る(Blue Green, A/Bテスト, Chaos
Engineering)
https://news.mynavi.jp/itsearch/article/devsoft/5025
【連載】Kubernetes入門【第15回】CI/CDにおける潮流 - CIOpsからGitOpsへ
• CI・CDサーバに広い権限を与えて良
いのか?
• CIとCDは同じ権限で良いのか?
• CIとCDは利用するユーザが異なるの
では?
変化 疑問
15
GitOpsの目的 〜C. 委譲〜
アプリケーションとインフラ間を疎結合に
CIOps GitOps
App /Infra
Registry
Container
Registry
App
Registry
Container
Registry
Infra
Registry
Developer SRE Developer
ロールが曖昧 広い権限 ロール別の適切な権限
https://news.mynavi.jp/itsearch/article/devsoft/5025
【連載】Kubernetes入門【第15回】CI/CDにおける潮流 - CIOpsからGitOpsへ
SRE
CI/CD CI CD
16
Single Source of Truth 〜D. イベントリスナ
〜
インフラ設定の変更を検知し、環境反映
https://news.mynavi.jp/itsearch/article/devsoft/5154
【連載】Kubernetes入門【第17回】「ArgoCD」を使ってKubernetesでDevOps
App
Registry
Container
Registry
Infra
Registry
Developer SRE
Dev
Pod
Service
ReplicaSet
Deployment
Staging
Pod
Service
ReplicaSet
Deployment
Production
Pod
Service
ReplicaSet
Deployment
検知
反映
YAML
反映
17
Replicaは2つ
でなく3つに
CI CD
再掲: ②求められるスキル
インフラ領域にもソフトウェア開発のスキルが求められる
表:KubernetesやGitOpsに必要なスキル
スキル 概要 価値 代表ツール
A.宣言的
プログラミング
マニフェストにあるべき状態を
定義
if/elseなどの膨大な条件分岐の
回避
Kubernetes
B.DRYの原則
(Don't Repeat Yourself)
開発環境や本番環境間で設定を
共通化
仕様変更追従漏れの回避
Kubernetes
(Kustomize)
C.委譲 CDツールに処理を委譲
責務の分離 セキュリティリス
クの極小化
Argo CD, Flux2
D.イベントリスナ マニフェストの変更を検知し自
動デプロイ
Configuration Drift(構成の逸脱
)の回避
Argo CD, Flux2
18
全体を通して
技術の変遷が激しい時代。
Javaエンジニアもインフラスキルが求められるようになりました。
Javaエンジニアとしての強みはそのままに、
自らを変容し続け、常にイミグラントであって欲しいと思います。
イミグラント例示とマインド:
• Javaエンジニアからクラウドエンジニアやフルスタック、SREへ
• そのためにも、アーキテクチャ等も積極的に(・かつ適切に)変えていく
• CIOpsからGitOpsへ
• サーバレスやKubernetesの採用
• Observabilityの改善
19
For more...
• https://japan.zdnet.com/article/35159174/
• 日本の“IT巨人”NTTデータはどう変わる?
• 枯れた技術や尖った技術の調和を生み出す「技術の目利き」の信念
20
ご清聴ありがとうございました
21

Contenu connexe

En vedette

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

[JJUG CCC 2021 Fall]JavaエンジニアがKubernetesでGitOpsに入門する