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
Monitoring Kubernetes
Search
Shinji Tanaka
December 13, 2014
Technology
1
6.3k
Monitoring Kubernetes
gcp ja night #29
12 Dec 2014
Shinji Tanaka
December 13, 2014
Tweet
Share
More Decks by Shinji Tanaka
See All by Shinji Tanaka
Mackerel loves Machine Learnings
stanaka
0
2.9k
How to Contribute Go
stanaka
4
18k
Introduction to Mackerel
stanaka
0
1k
Upcoming features in 2016, Mackerel
stanaka
0
3.3k
Mackerel's first year and onward
stanaka
0
2.8k
Mackerel's first year and onward (in English)
stanaka
0
360
Blue-Green Deployment with ECS and monitoring
stanaka
0
570
Mackerel Meetup #4 (in Eng)
stanaka
0
480
Mackerel Meetup #4
stanaka
0
3.1k
Other Decks in Technology
See All in Technology
CAMERA-Suite: 広告文生成のための評価スイート / ai-camera-suite
cyberagentdevelopers
PRO
3
270
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
5
49k
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.6k
「最高のチューニング」をしないために / hack@delta 24.10
fujiwara3
21
3.4k
サイバーエージェントにおける生成AIのリスキリング施策の取り組み / cyber-ai-reskilling
cyberagentdevelopers
PRO
2
200
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
27
12k
Nix入門パラダイム編
asa1984
2
200
【若手エンジニア応援LT会】AWS Security Hubの活用に苦労した話
kazushi_ohata
0
160
生成AIの強みと弱みを理解して、生成AIがもたらすパワーをプロダクトの価値へ繋げるために実践したこと / advance-ai-generating
cyberagentdevelopers
PRO
1
180
20241031_AWS_生成AIハッカソン_GenMuck
tsumita
0
110
pandasはPolarsに性能面で追いつき追い越せるのか
vaaaaanquish
4
4.5k
顧客が本当に必要だったもの - パフォーマンス改善編 / Make what is needed
soudai
24
6.8k
Featured
See All Featured
Gamification - CAS2011
davidbonilla
80
5k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Build The Right Thing And Hit Your Dates
maggiecrowley
32
2.4k
A better future with KSS
kneath
238
17k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.8k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Thoughts on Productivity
jonyablonski
67
4.3k
Fontdeck: Realign not Redesign
paulrobertlloyd
81
5.2k
Imperfection Machines: The Place of Print at Facebook
scottboms
264
13k
[RailsConf 2023] Rails as a piece of cake
palkan
51
4.9k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Transcript
Monitoring Kubernetes gcp ja night #29 Hatena Co., Ltd. @stanaka
! 2014/12/12
[PR] Mackerel https://mackerel.io/
Kubernetes • Docker ΛΫϥελཧ! • ͍Ζ͍ΖͳڥͰಈ͔͍ͨ͠ • MackerelͰϦιʔεཧ͍ͨ͠
Kubernetes Monitoring ʹؔ࿈͢Δཁૉ • kubelet • cAdvisor • heapster
kubelet • ֤ϊʔυ(minion)Ͱಈ࡞ • kubernetes masterͱڠௐಈ࡞
cAdvisor • Dockerͷ౷ܭใΛऔಘ • ϗετશମͱίϯςφຖ • DockerҎ֎ͷίϯςφରԠ HPPHMFDBEWJTPS
heapster • Ϧιʔεใऩूπʔϧ • kubarnetesઐ༻ • InfluxDBΠϯϙʔτ (PPHMF$MPVE1MBUGPSNIFBQTUFS
kubarnetesඪ४ϞχλϦϯά
kubarnetesඪ४ϞχλϦϯά • heapster + cAdvisor → InfuxDB & Grafana
• Ϋϥελʹ͋ΔͷͰɺΫϥελΛ མ͢ͱམͪΔ
Minionͷ౷ܭใऔಘ • http://#{ipaddr}/stats/ • kubeletͷAPI • ཪͰcAdvisor͕ಈ͘ $ curl
http://10.240.153.49:10250/stats/ | jq 'keys' [ "name", “spec", # εϖοΫ “stats", # ౷ܭใ 1ඵ͝ͱ 60ඵؒ "subcontainers" ]
statsͷத $ curl http://10.240.56.195:10250/stats/90559c9f-‐8123-‐11e4-‐ a0ec-‐42010af08f91/php-‐redis | jq ".stats |
.[] | .timestamp" "2014-‐12-‐12T02:41:55.52640117Z" "2014-‐12-‐12T02:41:56.526265405Z" "2014-‐12-‐12T02:41:57.52632129Z" "2014-‐12-‐12T02:41:58.526385146Z" "2014-‐12-‐12T02:41:59.526285874Z" "2014-‐12-‐12T02:42:00.526267704Z" "2014-‐12-‐12T02:42:01.526227391Z" "2014-‐12-‐12T02:42:02.526312936Z" "2014-‐12-‐12T02:42:03.526225182Z" “2014-‐12-‐12T02:42:04.526287033Z" … (ҎԼɺ60ඵ)
statsͷத #2 # curl http://10.240.153.49:10250/stats/ | jq '.stats
| .[0] | keys' [ "cpu", "diskio", "filesystem", "memory", "network", "timestamp" ]
statsͷதৄࡉ UJNFTUBNQ DQV NFNPSZ OFUXPSL \SY UY^@\CZUFT QBDLFUT FSSPST
ESPQQFE^ pMFTZTUFN EFWJDF<> DBQBDJUZ VTBHF JP@UJNF EJTLJP JP@NFSHFE JP@RVFVFE JP@TFSWJDF@CZUFT NBKPS NJOPS TUBUT "TZOD 3FBE 4ZOD 5PUBM 8SJUF JP@TFSWJDF@UJNF JP@TFSWJDFE JP@UJNF JP@XBJU@UJNF TFDUPST
ϞχλϦϯάख๏ • Ϋϥελ্Ͱಈ͍͍ͯΔͷΛѲ • kubecfg list pods • kubecfg get
pods/#{ID} • Munion্ͷίϯςφͷঢ়ଶऔಘ • /stats/#{ID}/#{container}
kubecfg list pods • cluster/kubecfg.sh -json list pods \
JUFNT< \ JEGDFBFDBGG IPTULVCFSOFUFTNJOJPODCVPZBOU[PEJBDJOUFSOBM EFTJSFE4UBUF\ NBOJGFTU\ DPOUBJOFST< \ JNBHFCSFOEBOCVSOTQIQSFEJT OBNFQIQSFEJT
kubecfg get pods • cluster/kubecfg.sh -json get pods/ 73f777c6-8123-11e4-a0ec-42010af08f91 •
Ϩεϙϯε list pods ͱಉ͡
Munion্ͷίϯςφͷঢ়ଶऔಘ • curl http://10.240.56.195:10250/ stats/90559c9f-8123-11e4- a0ec-42010af08f91/php-redis | jq ".stats |
.[] | .timestamp” • Ϩεϙϯε/stats/ͱಉ͡
Φʔτεέʔϧ͍ͤͨ͞ • Ϧιʔεใऔಘ • αΠζมߋஅ • αΠζมߋ࣮ߦ(ඞཁ͕͋Ε)
podsͷಈతͳαΠζมߋ • resizeͰมߋ cluster/kubecfg.sh resize frontendController 4 $ cluster/kubecfg.sh
list replicationControllers Name Image(s) Selector Replicas -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ frontendController brendanburns/php-‐redis name=frontend 4
Kubenetesҹ • ͍Ζ͍Ζศརʹ͑ͦ͏Ͱເ͋Δ • ϓϩμΫγϣϯʹಥͬࠐΉͷ·ͩ… • དྷՆ͙Β͍ʹ͜ͳΕ͖ͯͦ͏?