About Cosense
Help
Log in
ebiken
G
K
E
G
a
t
e
w
a
y
A
P
I
G
K
E
の
L
B
の
一
つ
I
n
g
r
e
s
s
と
違
っ
て
複
数
n
a
m
e
s
p
a
c
e
に
紐
付
け
ら
れ
た
り
す
る
ら
し
い
h
t
t
p
s
:
/
/
c
l
o
u
d
.
g
o
o
g
l
e
.
c
o
m
/
k
u
b
e
r
n
e
t
e
s
-
e
n
g
i
n
e
/
d
o
c
s
/
c
o
n
c
e
p
t
s
/
g
a
t
e
w
a
y
-
a
p
i
h
t
t
p
s
:
/
/
m
e
d
i
u
m
.
c
o
m
/
g
o
o
g
l
e
-
c
l
o
u
d
-
j
p
/
g
k
e
-
g
a
t
e
w
a
y
-
4
1
5
0
6
4
9
d
8
c
3
7
h
t
t
p
s
:
/
/
c
l
o
u
d
.
g
o
o
g
l
e
.
c
o
m
/
k
u
b
e
r
n
e
t
e
s
-
e
n
g
i
n
e
/
d
o
c
s
/
c
o
n
c
e
p
t
s
/
g
a
t
e
w
a
y
-
a
p
i
#
i
n
g
r
e
s
s
h
t
t
p
s
:
/
/
m
e
d
i
u
m
.
c
o
m
/
g
o
o
g
l
e
-
c
l
o
u
d
-
j
p
/
g
k
e
-
g
a
t
e
w
a
y
-
4
1
5
0
6
4
9
d
8
c
3
7
2
0
2
2
/
2
/
1
5
時
点
で
v
1
A
l
p
h
a
1
な
た
め
、
v
1
B
e
t
a
1
ま
で
は
大
幅
な
変
更
が
想
定
さ
れ
る
。
本
番
で
使
う
こ
と
は
非
推
奨
概
要
K
u
b
e
r
n
e
t
e
s
G
a
t
e
w
a
y
A
P
I
の
G
K
E
版
実
装
h
t
t
p
s
:
/
/
g
a
t
e
w
a
y
-
a
p
i
.
s
i
g
s
.
k
8
s
.
i
o
/
h
t
t
p
s
:
/
/
t
e
c
h
b
l
o
g
.
z
o
z
o
.
c
o
m
/
e
n
t
r
y
/
g
k
e
-
c
o
n
t
r
o
l
l
e
r
-
v
e
r
i
f
i
c
a
t
i
o
n
#
K
u
b
e
r
n
e
t
e
s
-
G
a
t
e
w
a
y
-
A
P
I
%
E
3
%
8
1
%
A
E
%
E
9
%
9
6
%
8
B
%
E
7
%
9
9
%
B
A
%
E
8
%
8
3
%
8
C
%
E
6
%
9
9
%
A
F
%
E
3
%
8
1
%
A
8
%
E
7
%
8
9
%
B
9
%
E
5
%
B
E
%
B
4
I
n
g
r
e
s
s
の
ス
ー
パ
ー
セ
ッ
ト
と
い
う
イ
メ
ー
ジ
h
t
t
p
s
:
/
/
c
l
o
u
d
.
g
o
o
g
l
e
.
c
o
m
/
k
u
b
e
r
n
e
t
e
s
-
e
n
g
i
n
e
/
d
o
c
s
/
c
o
n
c
e
p
t
s
/
g
a
t
e
w
a
y
-
a
p
i
#
i
n
g
r
e
s
s
I
n
g
r
e
s
s
に
は
な
い
機
能
マ
ル
チ
c
l
u
s
t
e
r
、
マ
ル
チ
n
a
m
e
s
p
a
c
e
カ
ス
タ
ム
ヘ
ッ
ダ
ー
ベ
ー
ス
の
ル
ー
テ
ィ
ン
グ
ト
ラ
フ
ィ
ッ
ク
の
重
み
付
け
ク
ラ
ス
タ
と
ル
ー
テ
ィ
ン
グ
設
定
の
権
限
分
離
ク
ラ
ス
タ
管
理
者
と
ア
プ
リ
ケ
ー
シ
ョ
ン
管
理
者
が
い
た
と
き
に
、
G
a
t
e
w
a
y
,
H
T
T
P
R
o
u
t
e
そ
れ
ぞ
れ
で
R
B
A
C
で
権
限
管
理
で
き
る
G
a
t
e
w
a
y
A
P
I
と
は
以
下
の
リ
ソ
ー
ス
を
包
含
す
る
G
a
t
e
w
a
y
C
l
a
s
s
ク
ラ
ス
タ
ご
と
に
用
意
す
る
L
B
(
l
4
/
l
7
)
の
テ
ン
プ
レ
ー
ト
G
a
t
e
w
a
y
L
B
で
ト
ラ
フ
ィ
ッ
ク
の
リ
ッ
ス
ン
設
定
H
T
T
P
R
o
u
t
e
G
a
t
e
w
a
y
→
k
8
s
S
e
r
v
i
c
e
の
ル
ー
テ
ィ
ン
グ
h
e
a
d
e
r
b
a
s
e
ル
ー
テ
ィ
ン
グ
の
例
h
t
t
p
s
:
/
/
g
i
s
t
.
g
i
t
h
u
b
.
c
o
m
/
k
a
z
s
h
i
n
o
h
a
r
a
/
a
6
6
0
d
4
1
0
e
9
3
4
6
e
3
c
3
0
b
2
5
0
1
0
0
6
0
a
9
8
3
e
#
f
i
l
e
-
i
-
g
w
-
h
t
t
p
r
o
u
t
e
-
h
e
a
d
e
r
-
r
e
w
r
i
t
e
-
y
a
m
l
w
e
i
g
h
t
付
け
ル
ー
テ
ィ
ン
グ
の
例
h
t
t
p
s
:
/
/
g
i
s
t
.
g
i
t
h
u
b
.
c
o
m
/
k
a
z
s
h
i
n
o
h
a
r
a
/
0
5
f
d
3
f
9
8
7
3
d
7
f
2
9
7
d
e
c
4
7
5
f
2
7
1
d
8
5
a
c
5
#
f
i
l
e
-
i
-
g
w
-
h
t
t
p
r
o
u
t
e
-
s
p
l
i
t
-
y
a
m
l
I
n
g
r
e
s
s
は
G
a
t
e
w
a
y
+
H
T
T
P
R
o
u
t
e
と
対
応
す
る
リ
ソ
ー
ス
に
な
る
ま
た
、
P
r
e
v
i
e
w
の
た
め
2
0
2
2
/
2
/
1
6
時
点
で
ま
だ
色
々
使
え
な
い
機
能
/
問
題
が
あ
る
h
t
t
p
s
:
/
/
c
l
o
u
d
.
g
o
o
g
l
e
.
c
o
m
/
k
u
b
e
r
n
e
t
e
s
-
e
n
g
i
n
e
/
d
o
c
s
/
h
o
w
-
t
o
/
d
e
p
l
o
y
i
n
g
-
g
a
t
e
w
a
y
s
#
l
i
m
i
t
a
t
i
o
n
s
>
現
在
、
G
a
t
e
w
a
y
に
よ
っ
て
作
成
さ
れ
た
G
o
o
g
l
e
C
l
o
u
d
ロ
ー
ド
バ
ラ
ン
サ
の
リ
ソ
ー
ス
は
G
o
o
g
l
e
C
l
o
u
d
C
o
n
s
o
l
e
U
I
に
表
示
さ
れ
ま
せ
ん
。
>
G
o
o
g
l
e
マ
ネ
ー
ジ
ド
S
S
L
証
明
書
の
自
動
生
成
は
サ
ポ
ー
ト
さ
れ
て
い
ま
せ
ん
>
予
め
手
動
で
作
っ
た
証
明
書
は
利
用
可
能
B
a
c
k
e
n
d
C
o
n
f
i
g
は
利
用
で
き
る
が
、
G
A
前
に
置
き
換
え
ら
れ
る
ら
し
い
h
t
t
p
s
:
/
/
c
l
o
u
d
.
g
o
o
g
l
e
.
c
o
m
/
k
u
b
e
r
n
e
t
e
s
-
e
n
g
i
n
e
/
d
o
c
s
/
h
o
w
-
t
o
/
g
a
t
e
w
a
y
c
l
a
s
s
-
c
a
p
a
b
i
l
i
t
i
e
s
#
s
e
r
v
i
c
e
料
金
リ
ー
ジ
ョ
ナ
ル
は
追
加
料
金
無
し
マ
ル
チ
ク
ラ
ス
タ
は
か
か
る
h
t
t
p
s
:
/
/
c
l
o
u
d
.
g
o
o
g
l
e
.
c
o
m
/
k
u
b
e
r
n
e
t
e
s
-
e
n
g
i
n
e
/
p
r
i
c
i
n
g
#
m
u
l
t
i
-
c
l
u
s
t
e
r
-
i
n
g
r
e
s
s
感
想
B
l
u
e
-
G
r
e
e
n
D
e
p
l
o
y
m
e
n
t
/
C
a
n
a
r
y
D
e
p
l
o
y
に
つ
い
て
現
状
の
機
能
で
実
現
は
で
き
る
が
、
重
み
の
変
更
や
ス
イ
ッ
チ
ン
グ
は
手
動
で
k
u
b
e
a
p
p
l
y
す
る
感
じ
に
な
る
所
謂
P
r
o
g
r
e
s
s
i
v
e
D
e
p
l
o
y
m
e
n
t
の
仕
組
み
は
な
い
の
で
、
自
動
で
そ
の
あ
た
り
も
や
っ
て
く
れ
る
A
r
g
o
R
o
l
l
o
u
t
s
の
方
が
良
さ
そ
う
今
後
G
a
t
e
w
a
y
A
P
I
を
ラ
ッ
プ
す
る
形
で
A
r
g
o
R
o
l
l
o
u
t
s
と
か
他
の
ツ
ー
ル
が
使
え
る
よ
う
に
な
る
と
か
は
あ
る
か
も
Related
Sort by
Related
Modified
Created
Last visited
Most linked
Page rank
Title
Links
Argo Rollouts
https://github.com/argoproj/argo-rollouts[ArgoCD] と同じ [CNCF], Argo Project 配下のプロジェクトで、[Kubernetes] custom controller, CRD によって [Progressive Delivery] を実現するツール宣言的に k8s manifest で設定を行えるdeployment に代わる rollout という CRD を利用する
GKE
Blue-Green Deployment
デプロイ方式の1つ既存の環境を複製し、DNSでリクエストを切り替える参考https://www.publickey1.jp/blog/14/blue-green_deployment.html
Canary Deploy
GKE
ebiken
HTTP/2.0 Load Balancing
[HTTP/2.0]のトラフィックをロードバランシングする[gRPC]の文脈で話に挙がることが多いそもそもLBにどんなものがあるかDNS ラウンドロビンあるドメインに複数のAレコードを登録しておき、名前解決が行われるたびに順番にIPを返す
GKE Workload Identity
[GKE] の権限管理をIAMで行う仕組み[Kubernetes] の ServiceAccount と Google Cloud の IAM を紐付けるhttps://cloud.google.com/kubernetes-engine/docs/concepts/workload-identity
GKE autopilot
[GKE] の運用モードノードの管理がマネージドになるhttps://cloud.google.com/kubernetes-engine/docs/concepts/autopilot-overview
GKE Image streaming
[GKE]https://cloud.google.com/kubernetes-engine/docs/how-to/image-streaminghttps://cloud.google.com/blog/products/containers-kubernetes/introducing-container-image-streaming-in-gkefaster autoscalinglow latency to pull image
GKE metrics
https://cloud.google.com/stackdriver/docs/solutions/gke/managing-metrics[GKE]で取得できる指標 (2022/6 時点)system metricsmanaged service for [Prometheus]workload metrics (deprecated)
dockershim
[Docker] と [CRI] の連携をするもの[Kubernetes] 1.24 で使えなくなる[GKE] だと default は [containerd] になるhttps://kubernetes.io/blog/2021/11/12/are-you-ready-for-dockershim-removal/
Cloud Run for Anthos
Cloud Endpoints
Google Cloud Deploy
https://cloud.google.com/deploy[GKE] のマネージド CD ツール
Kubernetes The Hard Way
#TODOhttps://github.com/kelseyhightower/kubernetes-the-hard-way[GKE]で[Kubernetes]を学ぶ資料[ebiken.icon]なかなか良さそうなのでまとまった時間取ってやりたい
GKE preemptible Node で動かさないように
[GKE]を使っているなかで安価な[preemptible] Node を使いたいただ、[CronJob]など特定のリソースをそこには配置したくない長時間実行されるJobなどは途中で止められたくない
GCLB 以下のNginxでクライアントIPを取得する
[X-Forwarded-For header]を利用して取得する[Cloud Load Balancing]を使う場合GoogleCloudのIP帯域とLBのIPアドレスを指定する必要がある
GKEでgRPCサービスを動かす
[GKE]の上で[gRPC]サービスを動かしたい方法[Cloud Load Balancing]のL7LBを使い、TLS終端はアプリケーションで行うgRPCヘルスチェックはできない負荷分散アルゴリズムの細かい制御ができない
GKE CloudLoadBalancing 連携
[GKE]で[Cloud Load Balancing]を使う外部https://cloud.google.com/load-balancing/docs/https内部https://cloud.google.com/load-balancing/docs/l7-internal
GKEでサクッとアプリを動かす
[GKE]でサクッとアプリを動かす[go]のhttpサーバーをサクッとデプロイして動かしたい手順Dockerfile作るdocker build
アプリエンジニアが本当に必要だったCloud Nativeとは…! cndjp#15
Google Cloud Next #19 Tokyo DevDay
https://cloud.withgoogle.com/next/tokyoServerless containers with Cloud RunWhat is [Serverless]operational modelno infra management
少人数で実現するGKEとFirebaseを使ったブロックチェーンアプリ開発手法 @GoogleCloudNext #19 Tokyo
[GoogleCloudNext #19 Tokyo Day2][Ginco] CTO 森下真敬[Blockchain]WalletSolutions
メルペイのマイクロサービスを支えるGKEとCloud Spanner @GoogleCloudNext#19 Tokyo
[Google Cloud Next #19 Tokyo Day1][tjun] @[merpay] [SRE]40以上のマイクロサ−ビス1Qで1444億円以上マイクロサービス概要
Developer boost 2018
12/15オープンソースとグローバルで戦うスタートアップという生き方[STUDIO] kaiさん、[progate] katoさん、[BoostIO] yokomizoさん技術選定について未来を見て技術選定する
Blue-Green Deployment
ArgoCD
Spinnaker
マイクロサービスアーキテクチャ - 本
JAWS-UG コンテナ支部 #14
https://jawsug-container.connpass.com/event/122013/catabira.com における Amazon [EKS] 活用事例 - Kubernetes による継続的デリバリ編池内 孝啓さん(@[iktakahiro]) / 株式会社 [catabira] CEOhttps://speakerdeck.com/iktakahiro/eks-cd-usecase-at-catabira
詳解システムパフォーマンス 1. イントロダクション
Kubernetes Meetup Tokyo #32
Canary Deploy
次世代Webカンファレンス
2019/1/13@[法政大学][Jxck]さん主催収録https://www.youtube.com/channel/UCFq8UHBXg8YNHCeaGmtSFEw
New Links
Progressive Deployment
Created
4 years ago
by
Kenichi Ebinuma
Updated
3 years ago
by
Kenichi Ebinuma
Views: 24
Page rank: 5.4
Copy link
Copy readable link
Start presentation
Hide dots
GKE Gateway API
GKE
の LB の一つ
Ingress と違って複数 namespace に紐付けられたりするらしい
https://cloud.google.com/kubernetes-engine/docs/concepts/gateway-api
https://medium.com/google-cloud-jp/gke-gateway-4150649d8c37
https://cloud.google.com/kubernetes-engine/docs/concepts/gateway-api#ingress
https://medium.com/google-cloud-jp/gke-gateway-4150649d8c37
2022/2/15 時点で v1Alpha1 なため、v1Beta1 までは大幅な変更が想定される。本番で使うことは非推奨
概要
Kubernetes Gateway API の GKE 版実装
https://gateway-api.sigs.k8s.io/
https://techblog.zozo.com/entry/gke-controller-verification#Kubernetes-Gateway-API%E3%81%AE%E9%96%8B%E7%99%BA%E8%83%8C%E6%99%AF%E3%81%A8%E7%89%B9%E5%BE%B4
Ingress のスーパーセットというイメージ
https://cloud.google.com/kubernetes-engine/docs/concepts/gateway-api#ingress
Ingress にはない機能
マルチ cluster、マルチ namespace
カスタムヘッダーベースのルーティング
トラフィックの重み付け
クラスタとルーティング設定の権限分離
クラスタ管理者とアプリケーション管理者がいたときに、Gateway, HTTPRoute それぞれで RBAC で権限管理できる
Gateway API とは以下のリソースを包含する
GatewayClass
クラスタごとに用意する LB (l4/l7)のテンプレート
Gateway
LB でトラフィックのリッスン設定
HTTPRoute
Gateway → k8s Service のルーティング
header base ルーティングの例
https://gist.github.com/kazshinohara/a660d410e9346e3c30b25010060a983e#file-i-gw-httproute-header-rewrite-yaml
weight 付けルーティングの例
https://gist.github.com/kazshinohara/05fd3f9873d7f297dec475f271d85ac5#file-i-gw-httproute-split-yaml
Ingress は Gateway + HTTP Route と対応するリソースになる
また、Preview のため 2022/2/16 時点でまだ色々使えない機能/問題がある
https://cloud.google.com/kubernetes-engine/docs/how-to/deploying-gateways#limitations
現在、Gateway によって作成された Google Cloud ロードバランサのリソースは Google Cloud Console UI に表示されません。
Google マネージド SSL 証明書の自動生成はサポートされていません
予め手動で作った証明書は利用可能
BackendConfig は利用できるが、GA前に置き換えられるらしい
https://cloud.google.com/kubernetes-engine/docs/how-to/gatewayclass-capabilities#service
料金
リージョナルは追加料金無し
マルチクラスタはかかる
https://cloud.google.com/kubernetes-engine/pricing#multi-cluster-ingress
感想
Blue-Green Deployment
/
Canary Deploy
について
現状の機能で実現はできるが、重みの変更やスイッチングは手動で kube apply する感じになる
所謂
Progressive Deployment
の仕組みはないので、自動でそのあたりもやってくれる
Argo Rollouts
の方が良さそう
今後 Gateway API をラップする形で Argo Rollouts とか他のツールが使えるようになるとかはあるかも