Suche senden
Hochladen
EKSのCoreDNSにおいて、名前解決が失敗する事例とその解決法について
•
Als PPTX, PDF herunterladen
•
1 gefällt mir
•
750 views
shunki fujiwara
Folgen
Kubernetes Meetup #35でのLT資料です
Weniger lesen
Mehr lesen
Ingenieurwesen
Melden
Teilen
Melden
Teilen
1 von 13
Jetzt herunterladen
Empfohlen
Argo CD Deep Dive
Argo CD Deep Dive
shunki fujiwara
Kuberneteの運用を支えるGitOps
Kuberneteの運用を支えるGitOps
shunki fujiwara
Pythonで始める競技プログラミング
Pythonで始める競技プログラミング
shunki fujiwara
pythonで始める筋トレ(競技プログラミング)
pythonで始める筋トレ(競技プログラミング)
shunki fujiwara
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
Empfohlen
Argo CD Deep Dive
Argo CD Deep Dive
shunki fujiwara
Kuberneteの運用を支えるGitOps
Kuberneteの運用を支えるGitOps
shunki fujiwara
Pythonで始める競技プログラミング
Pythonで始める競技プログラミング
shunki fujiwara
pythonで始める筋トレ(競技プログラミング)
pythonで始める筋トレ(競技プログラミング)
shunki fujiwara
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
ChatGPT webinar slides
ChatGPT webinar slides
Alireza Esmikhani
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Project for Public Spaces & National Center for Biking and Walking
Weitere ähnliche Inhalte
Empfohlen
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
ChatGPT webinar slides
ChatGPT webinar slides
Alireza Esmikhani
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Project for Public Spaces & National Center for Biking and Walking
Empfohlen
(20)
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
Skeleton Culture Code
Skeleton Culture Code
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
How to have difficult conversations
How to have difficult conversations
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The six step guide to practical project management
The six step guide to practical project management
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
ChatGPT webinar slides
ChatGPT webinar slides
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
EKSのCoreDNSにおいて、名前解決が失敗する事例とその解決法について
1.
EKSのCoreDNSにおいて、 名前解決が失敗する事例とその解決法について @renjikari
2.
自己紹介 @renjikari SRE@freee K8sがすき。最近全然追えてないけどDockerもだいすき 最近は大体APEXをやる日々(ドヘタ) ホントは対面してボードゲームをするのがすき
3.
注意 今回の話は全編に渡りチームで原因調査、検証、実装を行ってます Thanks for @nekottyo/@hatajoe 今回の話のもう少し詳細に書いた版をブログにアップしてます 検証とか原因に対する解決策の今回選ばなかった方法とかも載せて ます LTは五分しかないので触りだけの気持ちでonss
4.
名前解決が一部失敗する話 (数ヶ月前)EKS上で動かしているとあるサービスの名前解決が一部失 敗 hpaなどによってpodが増減し、CoreDNSの乗っているNodeが shutdownされるときに名前解決が失敗していることに気づく CoreDNSはEKSを利用するときのデフォルトで起動しているDNS Cacheサーバ(という言い方であっているか…?)であり、今回の話で もこのCoreDNSを利用しているときに起きたもの
5.
CoreDNSの終了時の挙動 Podの終了時の挙動 https://qiita.com/superbrothers/items/3ac78daba3560ea406b2 CoreDNSはservice + deploymentによって宣言されているリソースで、podの終了時 には以下の1及び2が順序制御されずに行われる。 1.
podにshutdown命令がだされる 2. serviceのendpointの削除命令がだされる つまり、"serviceのendpointの削除が行われる前"にpodにたどりついたdns要求には (podがshutdown中なので)corednsから応答がないということになる。
6.
原因その① CoreDNSの終了時の挙動によってDNSが失敗してしまう。gracefulに 落ちてくれてない 諸々検証したところ、cluster全体でのdnsリクエスト数が1k req/secと かを超えるとたくさんこの事象が発生するみたい
7.
原因その① 解決編 CoreDNS health
pluginにlameduck オプションを導入 CoreDNS Podが終了を受け取ってからsleepしてくれるだけ Corefile .:53 { health { lameduck 10s } (関係ないので略) } }
8.
原因その② 今回の根本解決のためには解決策その①だけでは不十分でした。 ここでは解決策その①をしてなお失敗する事例を紹介します。
9.
原因その② ClusterAutoscaler(以下CA)とAWS AutoScalingGroup(以下ASG)の相性 が良くないようで、CAがnodeをへらすときにASGがdesiredをフラッピ ングさせてしまうことがあるようです。 事象はこの辺のissueで上がっています。おそらくASGのAZ間の rebalanceによってこれが行われているという予想です(が、rebalance を切ることはできないので大変です) https://github.com/kubernetes/autoscaler/issues/2787 https://github.com/kubernetes/autoscaler/issues/3342
10.
原因その② CAが正常に(CoreDNS Podの乗っている)Nodeをdrainしていれば解決 策その①によって、CoreDNS Podは終了時にsleepし安全に落ちます 。 ASGのdesiredのフラッピングによって、ASGがInstanceを落とす際に はdrainなどをせず突然落とします。 そうするとlameduckを設定していても同様に名前解決が失敗する事象 が発生します。
11.
原因その② 解決編 ASGがInstanceを落とすときにlifecicle hookによって安全に落として あげれば良さそうです 今回はlifecicle
hookの追加とそれをhookしてnodeをdrainするnode- drainerというものを作りました
12.
原因その② 解決編 中身はkube-awsがやっていたnode-drainerのやり方を真似させて頂いてます 。 ① ASGがInstanceをterminateしようとする ②
Lifecicle hookで、terminate時にstatusをtermination:waitになるように ③ K8s上にいるDaemonset Node-drainerが定期的に自分のstatusをmetadata 経由で監視していて、termination:waitになったら、自分自身に対してdrainを かける ④ とても安全
13.
まとめ はじめにK8s上で名前解決失敗しだしたときは何事かと思った いろんな原因とそれに対する複数の解決策を考えて検証してってやっ ててなんか楽しかった
Jetzt herunterladen