TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Kubernetes Production Patterns and Anti-Patterns

343 点作者 twakefield将近 8 年前

14 条评论

atombender将近 8 年前
Good news about zombies: Kubernetes will soon solve this by having the pause container (which is automatically included in every pod) automatically reap children. [1]<p>Note that this change depends on the shared PID namespace support, which a larger, still-ongoing endeavour [2].<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;kubernetes&#x2F;kubernetes&#x2F;commit&#x2F;81d27aa23969b77f5e7e565b0b69234537b0503e" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;kubernetes&#x2F;kubernetes&#x2F;commit&#x2F;81d27aa23969...</a><p>[2] <a href="https:&#x2F;&#x2F;github.com&#x2F;kubernetes&#x2F;kubernetes&#x2F;issues&#x2F;1615" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;kubernetes&#x2F;kubernetes&#x2F;issues&#x2F;1615</a>
评论 #14525872 未加载
评论 #14525908 未加载
评论 #14530799 未加载
web007将近 8 年前
This is an excellent check-list of both kubernetes and docker gotchas to avoid.<p>Coming into the k8s ecosystem with very little container experience has been a steep learning curve, and simple, concrete suggestions like this go a LONG way to leveling it out.
twakefield将近 8 年前
We&#x27;ve also published some other workshops for Docker and Kubernetes that we take customers through when onboarding (if needed): <a href="https:&#x2F;&#x2F;github.com&#x2F;gravitational&#x2F;workshop" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;gravitational&#x2F;workshop</a><p>Feel free to take them for a spin and feedback welcome and appreciated.
评论 #14526907 未加载
outworlder将近 8 年前
I would like to have seen more &quot;patterns&quot; regarding configuration.<p>Right now, we have a bunch of microservices. Most of them talk to our shared infrastructure. We started with single configuration file, which has grown to monstrous proportions, and is mounted on every pod as a config map.<p>What would be the correct approach? Multiple configmaps with redundant information are just as bad, if not worse.
评论 #14526511 未加载
评论 #14527762 未加载
lclarkmichalek将近 8 年前
Might be worth mentioning about Docker&#x27;s native support for multi stage builds: <a href="https:&#x2F;&#x2F;docs.docker.com&#x2F;engine&#x2F;userguide&#x2F;eng-image&#x2F;multistage-build&#x2F;" rel="nofollow">https:&#x2F;&#x2F;docs.docker.com&#x2F;engine&#x2F;userguide&#x2F;eng-image&#x2F;multistag...</a> (still quite a new feature, plenty of people won&#x27;t have it yet I guess)<p>Edit: oh, you kind of do. Well, it&#x27;s not upcoming any more, it&#x27;s in the latest Docker CE :)
评论 #14524984 未加载
评论 #14524698 未加载
bryanlarsen将近 8 年前
Have you tried out istio yet? It&#x27;s the packaging of Lyft&#x27;s Envoy that Google and IBM are putting together to handle your last two points, circuit breaking and rate limiting and much more.
评论 #14525167 未加载
Langhalsdino将近 8 年前
Awesome github repo! I think i need to incorporated some of your patterns into my work ;)<p>If some of you are interested in Kubernetes GPU cluster for deep learning, this article might be good to read as well. <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=14526807" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=14526807</a>
pooktrain将近 8 年前
The presentation of patterns here is quite helpful. Is anyone aware of other resources for container design patterns?<p>The k8s blog has some as well: <a href="http:&#x2F;&#x2F;blog.kubernetes.io&#x2F;2016&#x2F;06&#x2F;container-design-patterns.html" rel="nofollow">http:&#x2F;&#x2F;blog.kubernetes.io&#x2F;2016&#x2F;06&#x2F;container-design-patterns....</a>
throwaway34802将近 8 年前
Have you tried using Habitat? It pairs nicely with Kubernetes and solves alot of these antipatterns I feel like.<p><a href="https:&#x2F;&#x2F;habitat.sh" rel="nofollow">https:&#x2F;&#x2F;habitat.sh</a><p><a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=-yTeXCY3iM0" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=-yTeXCY3iM0</a>
old-gregg将近 8 年前
Some background on these workshops: we (Gravitational) help SaaS companies package their applications into Kubernetes, this makes them deployable into on-premise environments [1]. This in itself is an unexpected and quite awesome benefit of adopting Kubernetes in your organization: your stack becomes one-click portable.<p>[1] <a href="http:&#x2F;&#x2F;gravitational.com&#x2F;telekube" rel="nofollow">http:&#x2F;&#x2F;gravitational.com&#x2F;telekube</a>
评论 #14525266 未加载
nunez将近 8 年前
what are everyone&#x27;s thoughts on building containers for running one time binaries? like building a container to run jq or awk or something like that.<p>i&#x27;ve seen this pattern before and it didnt make me feel very good. it reeks of unnecessary complexity.
评论 #14527779 未加载
m0rganic将近 8 年前
we use kubernetes, helm and gitlab.. runtime configuration lives in each repo next to code - values.yaml, dev.yaml, test.yaml, prod.yaml to store applications runtime configuration -- each environment is host to 40+ redundant services.. its working quite well but has required a pretty big upfront investment... surprised there was much discussion about monitoring- prometheus and grafana work well for that
eldios将近 8 年前
Awesome article!
humanfromearth将近 8 年前
&gt; Anti-Pattern: Direct Use Of Pods &gt; Kubernetes Pod is a building block that itself is not durable.<p>Kind of.. but you can set `restartPolicy: Always` and will always restart in case of failure.
评论 #14525472 未加载
评论 #14525685 未加载