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
クラスタ外から ClusterIP の Service に いい感じにアクセスする / How...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Kazuki Suda
November 27, 2019
Technology
1.4k
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
クラスタ外から ClusterIP の Service に いい感じにアクセスする / How to connect to ClusterIP Service from the outside of Kubernetes cluster
【前夜祭】CloudNative Days Kansai 2019 Meetup /
https://cloudnativedays.connpass.com/event/152321/
Kazuki Suda
November 27, 2019
More Decks by Kazuki Suda
See All by Kazuki Suda
"なるべくスケジューリングしない" を実現する "PreferNoSchedule" taint
superbrothers
0
260
実践/先取り「入門 Kubernetes Validating/Mutating Admission Policy」 / CloudNative Days Winter 2024
superbrothers
0
90
個人的、Kubernetes の最新注目機能! (2024年5月版)
superbrothers
0
180
Kubernetes + containerd で cgroup v2 に移行したら "failed to create fsnotify watcher" エラーが発生する原因と対策
superbrothers
0
1.6k
Kubernetes にこれから入るかもしれない注目機能!(2022年11月版)
superbrothers
2
1.6k
コミュニティ/ 勉強会紹介
superbrothers
0
290
高可用性、省力運用を目指す 自宅 Kubernetes クラスタ (K8s@home #1)
superbrothers
13
6.7k
KubeCon + CloudNativeCon Europe 2022 Recap
superbrothers
0
120
独断と偏見で選んだ Kubernetes 1.24 の注目機能と今後!
superbrothers
2
8.8k
Other Decks in Technology
See All in Technology
越境するなら専門用語を使うな高校校歌 / If you wanna cross border, you shouldn't use jargon
vtryo
0
150
AIは推し活である。
kurazuuuuuu
1
930
AIに任せた品質は、誰が見立てるのか - AI時代のテストマネジメント
nakanao
3
2.7k
「ピッケル本」日本語版は4.0(第6版)が出版されるべき / pickaxe4-nagoyark05
kakutani
2
270
Von-Neumann Machines, Dreams & The Futures of IT
ufried
0
120
AIエージェントを最高のパートナーに育てる方法|評価と判断軸を育てる5つのステップ
koichiaoki
1
160
AI 時代のスタートアップエコシステ厶から考究する技術的負債との向き合い方
m3m0r7
PRO
3
2.5k
株式会社シーエーシー エンジニア向け会社紹介資料
cac
0
57k
Claude Codeを「使うほど育つ」AI秘書にするノウハウ
minorun365
PRO
33
30k
「どのログを見ればいい?」 から始めた サーバーレス障害解析
y_waka1
1
120
銀行勘定系システムにおける開発プロセス刷新×AIによる環境モダナイゼーション / Development Process Transformation and AI-Driven Environment Modernization
muit
1
2.6k
登壇の自信を奪う3匹のオバケ / 3 Ghosts That Rob You of Your Confidence in Public Speaking
pauli
9
1.1k
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Google's AI Overviews - The New Search
badams
0
1.6k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
57k
BBQ
matthewcrist
89
10k
The World Runs on Bad Software
bkeepers
PRO
72
12k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.8k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
Utilizing Notion as your number one productivity tool
mfonobong
4
590
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
The Cult of Friendly URLs
andyhume
79
7k
Ethics towards AI in product and experience design
skipperchong
2
380
Transcript
【前夜祭】CloudNative Days Kansai 2019 Meetup (2019/11/27) Kazuki Suda, @superbrothers クラスタ外から
ClusterIP の Service に いい感じにアクセスする
Kazuki Suda / @superbrothers ▶ Kubernetes Meetup Tokyo, Prometheus Tokyo
Meetup, Cloud Native Deep Dive 共同主催者 ▶ Kubernetes Active Contributor ▶ CNCF Ambassador
Kubernetes Service リソース ▶ 仮想 IP とポート ▶ L4 ロードバランサに相当
▶ いくつかのタイプ + ClusterIP (Internal) + NodePort + LoadBalancer (External) + Service my-svc タイプ: ClusterIP セレクタ: app=nginx ポート: 8080/tcp→80/tcp clusterIP: 10.0.171.239 Pod A Pod B ReplicaSet app: nginx app: nginx
ClusterIP で作成した Service にクラスタ外からアクセスしたい ▶ がしかし、ClusterIP はクラスタ内からしかアクセスできない
アクセスできないならじゃあどうする $ kubectl port-forward svc/nginx $ kubectl run busybox --rm
--it --image=busybox --restart=Never \ --command -- wget -O- nginx
でもやっぱりクラスタ外からいい感じにアクセスしたい Service リソースの proxy サブリソース
Kubernetes Service proxy サブリソース ▶ /api/v1/namespaces/<namespace>/services/<scheme>:<service>:<port>/proxy
$ kubectl proxy & $ curl 127.0.0.1:8001/api/v1/namespaces/default/services/nginx/proxy/
Service proxy サブリソースをもっともいい感じに使いたい ▶ kubectl open-svc プラグイン
None
# Open service/nginx in namespace/default $ kubectl open-svc nginx -n
default
# How to install kubectl open-svc plugin $ kubectl krew
install open-svc * https://github.com/kubernetes-sigs/krew