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
Using external services inside Kubernetes
Search
Maxim Filatov
June 17, 2018
Technology
98
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Using external services inside Kubernetes
Video:
https://youtu.be/W5wgl1WSDGI
Maxim Filatov
June 17, 2018
More Decks by Maxim Filatov
See All by Maxim Filatov
Kubernetes on bare metal: SSL
bregor
1
750
Kubernetes and Weave.net on bare metal
bregor
1
490
Other Decks in Technology
See All in Technology
顧客に向き合う開発組織へ。リアーキテクチャとフィーチャーチーム化で挑む組織改革
safie
0
560
Reactの設計論
uhyo
17
9k
リージョンの壁を越える、 ちょっと変わったAWSサービスの話
falken
PRO
1
310
2026-09-11 【Snowflake World Tour Tokyo 2026】Snowflakeを起点に、AI Agentが自律稼働し続ける未来へ / Driving AI Agents with Snowflake
civitaspo
0
380
Sigmaで作る業務アプリ
kazushiro_honma
0
130
2026_devsumi_ozono.pdf
o3
3
450
DEFCON34-Write-up_HYCu-MYCu
daikiokazaki
0
160
AI 駆動 Terraform 開発/SRE_BizReach_MIXI_2
visional_engineering_and_design
5
2.1k
20260912_スクフェス三河
kgnkhkr
0
330
AIで仕事のやり方を変える
matsu7874
3
1.1k
AIを活用するために決めた "やらないこと" - 価値に注目する / Not betting on AI
soudai
PRO
1
450
Minecraft JavaのMODをSwiftで作る
1mash0
0
140
Featured
See All Featured
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Deep Space Network (abreviated)
tonyrice
0
300
エンジニアに許された特別な時間の終わり
watany
108
250k
Producing Creativity
orderedlist
PRO
348
41k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
320
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
700
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
Unsuck your backbone
ammeep
672
58k
Transcript
Using external services inside Using external services inside Kubernetes Kubernetes
None
Components Components
Networks Networks Host network: 192.168.0.0/24 Service network: 10.0.0.0/16 Pod network:
172.16.0.0/16
Hosts Hosts master01: 192.168.0.1 master02: 192.168.0.2 master03: 192.168.0.3 pgsql-master: 192.168.0.10
pgsql-slave: 192.168.0.11
Services Services kubernetes: 10.0.0.1 dns: 10.0.0.254
“Normal” ow “Normal” ow
External services External services
Con guration way Con guration way export DATABASE_URL='postgresql://
[email protected]
:5432/production_db'
WRONG WRONG
Database failure Database failure export DATABASE_URL='postgresql://
[email protected]
:5432/production_db' You should resetup ALL
related deployments and restart ALL theirs pods for hosted service address recon guration
DNS way DNS way postgres IN A 192.168.0.10 export DATABASE_URL="postgresql://
[email protected]
:5432/production_db"
WRONG! WRONG!
Database failure Database failure update DNS record Remember about DNS
cache Actually it is easier to kill all related pods
External services. The right External services. The right way way
Use force , Luke! endpoints and services
Obvious example Obvious example $ kubectl get endpoints kubernetes NAME
ENDPOINTS AGE kubernetes 192.168.0.1:8443,192.168.0.2:8443,192.168.0.3:8443 1y $ kubectl get service kubernetes NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE kubernetes ClusterIP 10.0.0.1 none 443/TCP 1y
In YAML: endpoint In YAML: endpoint apiVersion: v1 kind: Endpoints
metadata: name: kubernetes namespace: default subsets: - addresses: - ip: 192.168.0.1 - ip: 192.168.0.2 - ip: 192.168.0.3 ports: - name: https port: 8443 protocol: TCP
In YAML: service In YAML: service apiVersion: v1 kind: Service
metadata: labels: component: apiserver provider: kubernetes name: kubernetes namespace: default spec: clusterIP: 10.0.0.1 ports: - name: https port: 443 protocol: TCP targetPort: 8443 type: ClusterIP
Back to PostgreSQL Back to PostgreSQL
Endpoint Endpoint apiVersion: v1 kind: Endpoints metadata: name: postgres namespace:
hosted subsets: - addresses: - ip: 192.168.0.10 ports: - name: postgres port: 5432 protocol: TCP
Service Service apiVersion: v1 kind: Service metadata: name: postgres namespace:
hosted spec: ports: - name: postgres port: 5432 protocol: TCP targetPort: 5432 type: ClusterIP
Con guration Con guration export DATABASE_URL='postgresql://
[email protected]
:5432/produc
RIGHT! RIGHT! Service address is rock solid Service IP can
be preserved in service manifest Any host network recon guration is just endpoint upgrade Endpoint upgrade is rocket fast - kube-proxy rocks!
Questions? Questions?