Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Kubernetes 102 - O Caminho das pedras - Parte 2
Search
Getup Cloud
August 23, 2018
Programming
0
72
Kubernetes 102 - O Caminho das pedras - Parte 2
Services, o loadbalancer do kubernetes!
Getup Cloud
August 23, 2018
Tweet
Share
More Decks by Getup Cloud
See All by Getup Cloud
Kubernetes 101 - O Caminho das pedras - Parte 1
getupcloud
1
780
Plataforma de Desenvolvimento e Hosting na Nuvem
getupcloud
0
74
Getup Case Banco do Brasil/ Meetup OpenShift SP
getupcloud
0
74
PaaS na Terra - Cloud Computig ao alcance de todos
getupcloud
0
43
OpenShift Origin Index - Semana Acadêmica Feevale
getupcloud
0
62
PaaS - OpenShift como plataforma pública
getupcloud
0
50
Escalando aplicação Python usando Getup OpenShift
getupcloud
0
87
Computação em Nuvem para Agências Digitais e Desenvolvedores
getupcloud
1
160
Other Decks in Programming
See All in Programming
20251127_ぼっちのための懇親会対策会議
kokamoto01_metaps
2
450
リリース時」テストから「デイリー実行」へ!開発マネージャが取り組んだ、レガシー自動テストのモダン化戦略
goataka
0
130
Integrating WordPress and Symfony
alexandresalome
0
160
WebRTC と Rust と8K 60fps
tnoho
2
2k
ZOZOにおけるAI活用の現在 ~モバイルアプリ開発でのAI活用状況と事例~
zozotech
PRO
9
5.8k
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
10
1.3k
FluorTracer / RayTracingCamp11
kugimasa
0
240
マスタデータ問題、マイクロサービスでどう解くか
kts
0
110
ゲームの物理 剛体編
fadis
0
350
宅宅自以為的浪漫:跟 AI 一起為自己辦的研討會寫一個售票系統
eddie
0
510
ViewファーストなRailsアプリ開発のたのしさ
sugiwe
0
500
GISエンジニアから見たLINKSデータ
nokonoko1203
0
170
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
100
Game over? The fight for quality and originality in the time of robots
wayneb77
1
58
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
0
270
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
0
240
Java REST API Framework Comparison - PWX 2021
mraible
34
9k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
220
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.7k
Utilizing Notion as your number one productivity tool
mfonobong
2
180
Transcript
@juniorjbn
[email protected]
KUBERNETES - 102 Kubernetes it's not a Big
Deal. It's like the old infrastructure but without the old :D
João Brito @juniorjbn
[email protected]
Advocate/Sysadmin Getup Cloud
SVC Overview • Discovery • Balancing Remember • Readiness •
Liveness • ExecAction • TCPSocketAction • HTTPGetAction SVC
Service • Define ◦ Label Selector ◦ REST object kind:
Service apiVersion: v1 metadata: name: my-service spec: selector: app: MyApp ports: - protocol: TCP port: 80 targetPort: 9376 $ kubectl -n demo run hello-cloud --image juniorjbn/php-demo:1 --port 8080 $ kubectl -n demo expose deployment hello-cloud --port=80 --target-port=8080 --type=LoadBalancer
Service Multi-port • Define ◦ Label ◦ REST object ◦
Name kind: Service apiVersion: v1 metadata: name: my-service spec: selector: app: MyApp ports: - name: http protocol: TCP port: 80 targetPort: 9376 - name: https protocol: TCP port: 443 targetPort: 9377
HeadLess Service • What? ◦ External ◦ Manual kind: Endpoints
apiVersion: v1 metadata: name: my-service subsets: - addresses: - ip: 1.2.3.4 ports: - port: 9376 kind: Service apiVersion: v1 metadata: name: my-service spec: ports: - protocol: TCP port: 80 targetPort: 9376
Proxy-Mode Processos $ ps aux | grep kube-proxy $ journalctl
$ tail -f /var/log/kube-proxy.log Regras $ Kubectl -n demo get pods -o wide $ gcloud compute ssh <node> --zone <zone> $ iptables-save | grep hello
Service Type • ClusterIP ◦ Internal IP • NodePort ◦
NodeIP:NodePort • LoadBalancer ◦ ProviderAPI • ExternalName ◦ CNAME • ExternalIPs kind: Service apiVersion: v1 metadata: name: my-service spec: selector: app: MyApp ports: - name: http protocol: TCP port: 80 targetPort: 9376 externalIPs: - 80.11.12.10
Demo - Front + Back Colocar app no ar no
cluster criado: • BACKEND • $ kubectl create -f https://k8s.io/examples/service/access/hello.yaml • $ kubectl create -f https://k8s.io/examples/service/access/hello-service.yaml • FRONTEND • $ kubectl create -f https://k8s.io/examples/service/access/frontend.yaml • $ kubectl get service frontend --watch
Special Tks to: My Family My Team kubernetes.io Tks a
lot! Vocês são TOP!