Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Kubernetesでアプリケーションが動くまで
Search
hhiroshell
February 28, 2018
Technology
5
1.2k
Kubernetesでアプリケーションが動くまで
Kubernetesでアプリケーションが動くまで
hhiroshell
February 28, 2018
Tweet
Share
More Decks by hhiroshell
See All by hhiroshell
LINEヤフーにおける超大規模プラットフォーム実現への挑戦と学び / Challenges and Lessons in Building an Ultra-Large-Scale Platform at LY Corporation
hhiroshell
3
1.4k
Architecting Kubernetes-Based Internal Developer Platforms: Essential Patterns and Practices
hhiroshell
0
120
Discover Your Tailored Platform Strategy with Real-World Practice
hhiroshell
1
210
Kubernetesでアプリの安定稼働と高頻度のアップデートを両立するためのプラクティス / Best Practices for Applications on Kubernetesto Achieve Both Frequent Updates and Stability
hhiroshell
11
3.9k
Platform EngineeringにおけるKubernetesの活用法とLINEヤフーにおける事例のご紹介 / Platform Engineering and Kubernetes Findy Lunch LT Edition
hhiroshell
7
1.9k
大規模Webアプリケーションプラットフォームを開発して軌道に乗るまでにやったこと / How to Put Platforms on Track
hhiroshell
2
2.5k
Kubernetesとカスタムコントローラーを活用したプラットフォーム開発・運用の勘所 / Platform Engineering and Kubernetes
hhiroshell
1
1.3k
Best Practices for Applications on Kubernetesto Achieve Both Frequent Updates and Stability
hhiroshell
3
700
Cloud Native Developers JP (cndjp) のご紹介 / about cndjp
hhiroshell
0
220
Other Decks in Technology
See All in Technology
Developer Summit 2025 [14-D-1] Yuki Hattori
yuhattor
19
5.1k
Ask! NIKKEIの運用基盤と改善に向けた取り組み / NIKKEI TECH TALK #30
kaitomajima
1
450
Ask! NIKKEI RAG検索技術の深層
hotchpotch
13
2.8k
モノレポ開発のエラー、誰が見る?Datadog で実現する適切なトリアージとエスカレーション
biwashi
6
770
君も受託系GISエンジニアにならないか
sudataka
2
370
Larkご案内資料
customercloud
PRO
0
600
第13回 Data-Centric AI勉強会, 画像認識におけるData-centric AI
ksaito_osx
0
360
滅・サービスクラス🔥 / Destruction Service Class
sinsoku
6
1.5k
Classmethod AI Talks(CATs) #15 司会進行スライド(2025.02.06) / classmethod-ai-talks-aka-cats_moderator-slides_vol15_2025-02-06
shinyaa31
0
170
スタートアップ1人目QAエンジニアが QAチームを立ち上げ、“個”からチーム、 そして“組織”に成長するまで / How to set up QA team at reiwatravel
mii3king
1
1.1k
開発スピードは上がっている…品質はどうする? スピードと品質を両立させるためのプロダクト開発の進め方とは #DevSumi #DevSumiB / Agile And Quality
nihonbuson
1
1.3k
CZII - CryoET Object Identification 参加振り返り・解法共有
tattaka
0
240
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
540
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.4k
Building Adaptive Systems
keathley
40
2.4k
It's Worth the Effort
3n
184
28k
Optimising Largest Contentful Paint
csswizardry
34
3.1k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
1k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
114
50k
For a Future-Friendly Web
brad_frost
176
9.5k
Optimizing for Happiness
mojombo
376
70k
Transcript
Cloud Native Developers JP Kubernetesでアプリケーションが 動くまで @hhiroshell 1
Cloud Native Developers JP お品書き • アプリケーションを動かすための追加の予備知識 • 実際にやってみます 2
Cloud Native Developers JP アプリケーションを動かすための 追加の予備知識
Cloud Native Developers JP コンテナレジストリが必要 • コンテナレジストリから取得する • プライベートのレジストリを使うことも可能 k8sクラスター
>_ kubectl (CLI) コンテナ レジストリ > kubectl run …
Cloud Native Developers JP クラスター外からアクセスできるようにする方法 • クラスター外からPodにアクセスできるようにするには、用途に応 じて何通りかの方法がある – apiserver経由でのアクセス
– ServiceのNodePortタイプ – ServiceのLoadBarancerタイプ – Ingress (beta)
Cloud Native Developers JP APIサーバー経由でのアクセス • kubectlをproxyとして稼働させて、認証なしのAPIエンドポイントへ の経路を構成 • 所定のAPIエンドポイントにリクエストを投げるとPodに届く
• 主な用途はDashboardや監視ツール(Grafanaなど)へのアクセス k8sクラスター kubectl > kubectl proxy … >_ apiserver リクエスト
Cloud Native Developers JP ServiceのNodePortタイプ • 対象のPodにルーティングされる口を、各Node上に構成する • ポート番号は、各ノードで共通 クラスター外から
のリクエスト 172.17.8.104 172.17.8.103 172.17.8.102 172.17.8.104:30159 172.17.8.102:30159 172.17.8.103:30159
Cloud Native Developers JP ServiceのLoadBalancerタイプ • GCP, AWS, Azure上のロードバランサーを自動構成 •
クラスター内にはNodePortまたはClusterIPと同等のServiceを構成 クラスター外から のリクエスト LB
Cloud Native Developers JP Ingress • Webフロントとしての構成情報を設定するオブジェクト • ロードバランシング、SSL/TLS終端等の機能を提供 •
実際の動作を担う実態は、別途ReplicationControllerとしてデプロ イする必要がある – 例えば、NGINXを利用した、NGiNX Ingress Controllerがある • Betaなのでご注意(Kubernetes 1.9の時点)
Cloud Native Developers JP それではやってみます! もう一息…!
Cloud Native Developers JP 今からやる作業のチュートリアルを公開済みです • 「KubernetesでWeb-AP-DBの3層アプリケーションが動くまで」 – https://qiita.com/hhiroshell/items/5e81cac3e9c059029837 –
または[ qiita kubernetes 3層 ] くらいで検索するとトップに来ます 11
Cloud Native Developers JP 12 Fin