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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Teaching Kubernetes

223 点作者 ahawkins大约 8 年前

6 条评论

sandGorgon大约 8 年前
The first thing I do when I look at kubernetes tutorials is look at ingress or load-balancing... and usually I find it absent.<p>It is not the fault of the author (and I commend them for taking the trouble), but Kubernetes is super complex for getting traffic inside the cluster. But here&#x27;s a genuine appeal from someone who has suffered this before.<p>In kubernetes, you have multiple types of ingresses - and you invariably need to have a combination of them to get anything done correctly. For example nginx-ingress will lose source-ip info and will not do L4 proxying very well. Which is why the unsaid point of all kubernetes deployments is &quot;use ELB or GLB with proxy protocol and call it a day&quot;.<p>I get why - K8s is trying to solve the most complex problems first and trickling it down. Which means for the time being, ingress is a very hard problem to solve in k8s.<p>The second place where every one will get stuck is calico vs weave vs flannel vs whatever. Most tutorials say &quot;use any one of them and let&#x27;s move on&quot;. Unfortunately, that is not the case - choose your network plugins wisely.<p>After spending a lot of time in k8s, I setup a Docker Swarm cluster in about 3 hours. It does not have some of the more complex usecases supported but it does three things super well - networking, ingress and secrets ... and for most beginners, that&#x27;s all they need.<p>P.S. i have the exact same stack running on kubernetes and docker swarm<p>Docker Compose yml form 3.1 is brilliant - other than my docker files, i need a 30 line yml file to deploy my whole stack across 3 machines. Kubernetes on the other hand needs atleast 12 yml files (&quot;deployments&quot; and &quot;services&quot;). I&#x27;m not counting another 4 yml files for statefulsets and persistentvolumeclaim since there is nothing equivalent in docker swarm
评论 #13681229 未加载
评论 #13680397 未加载
评论 #13680808 未加载
评论 #13682181 未加载
评论 #13680185 未加载
评论 #13680025 未加载
评论 #13680461 未加载
ricw大约 8 年前
This is nice and an interesting overview, but it still leaves me confused whether one should even use k8s. We currently use a docker-compose to set up and run multi-container services (django, celery &amp; workers, nginx, cron&#x2F;backup), yet I&#x27;m somewhat unconvinced of why we should invest in &quot;upgrading&quot; to kubernetes.<p>My understanding is that it will make the system deal automatically with failing containers, though docker-compose already does that for us. Load balancing is another strength, though that is currently not an issue for us. It might automate certain container managing scripts, but that is less of an issue right now<p>In other words, I currently don&#x27;t see an actual benefit of k8s over even docker-compose (not docker-swarm, which I understand is the direct k8s alternative). Anyone able to elaborate?!
评论 #13681224 未加载
评论 #13680613 未加载
评论 #13682481 未加载
amq大约 8 年前
The first thing I&#x27;d like to be taught is where to use Kubernetes and where to avoid it (many people tend to think it&#x27;s the best practice to force everything into containers, and ideally, Kubernetes).
评论 #13679933 未加载
评论 #13679881 未加载
评论 #13679863 未加载
评论 #13680150 未加载
raesene9大约 8 年前
One thing that I think is very much still missing from the Kubernetes Documentation space is hardening guidelines.<p>There&#x27;s a lot of moving parts in there and some of the defaults for common install methods like kubeadm might be a bit of a surprise to people (e.g. the kubelet port being default open and allowing someone to take complete control of the cluster without authentication (<a href="https:&#x2F;&#x2F;raesene.github.io&#x2F;blog&#x2F;2016&#x2F;10&#x2F;08&#x2F;Kubernetes-From-Container-To-Cluster&#x2F;)" rel="nofollow">https:&#x2F;&#x2F;raesene.github.io&#x2F;blog&#x2F;2016&#x2F;10&#x2F;08&#x2F;Kubernetes-From-Co...</a>)<p>Ideally something which broke out the various components and had guidelines for possible security options would be a great addition, I think.
评论 #13682460 未加载
atombender大约 8 年前
For me, the weakest point of Kubernetes at the moment is the developer story. Many shops don&#x27;t have dedicated ops engineers, and would need to adapt&#x2F;abstract K8s in order to make it user friendly enough for developers to use.<p>For example, to start:<p>* Where do you store the YAML manifests, and how do you maintain them? Do you put them in the same git repo as your app, and if so, how do you deal with the fact that the YAML files are going to be different for production, staging, testing&#x2F;QA, etc.? (For example, ingresses will use other host names. Configs are likely to be rather different altogether.)<p>* Or if you centralize them in a single git repo, you have to make sure that you always pull the newest version, and that your workflow includes diffing against the currently deployed version, and so on.<p>* How do you protect configs&#x2F;secrets, if they&#x27;re in git and available to all?<p>* Dependency tracking: If app A needs app B, you want to encapsulate that dependency in your workflow.<p>* Continuous delivery: How do you take care of these concerns in relation to the CD system (e.g. Drone, Jenkins)?<p>* And of course, you&#x27;ll want to be able to develop locally. If you run Minikube, how do interact with it, YAML-wise?<p>There&#x27;s Helm, but Helm is essentially just a &quot;templates in a central repo&quot; manager. It doesn&#x27;t solve the configuration issue: You still need to provide <i>values</i> to the charts.<p>It doesn&#x27;t sit right to have the YAML files in the project&#x27;s git repo. Config follows environment, not project.<p>For our current, non-Kubernetes production setup, we have a tool called Monkey that allows people do things like &quot;monkey deploy staging:myapp -r mybranch&quot; to deploy a branch, or &quot;monkey sql prod:myapp&quot; to get a PostgreSQL shell against the production database for that app, with lots of nice commands to work with the cluster. They also work directly with the Vagrant VM that developers run locally: &quot;monkey deploy dev:myapp --dev&quot; actually deploys to the VM, pointing the directory to the user&#x27;s own project (on the host machine), so that the files are the same. Combined with a React&#x2F;Redux app, they get hot code reloading and so on without having to do anything special. This shields developers from the complexities and realities of a Linux server in a very nice, convenient way. We want to provide the same on top of Kubernetes.<p>Right now I&#x27;m debating whether to just go for &quot;simple and stupid&quot; and have a central repo, and then build a small toolset to wrap kubectl for devs. By running Minikube locally, devs would be able to use the same tool locally. The command-line tool could do things like always pull the repo to ensure you&#x27;re working with the newest files. The main challenge there is organizing the YAML files in a clean way. Do we use templates to reduce boilerplate? Or do we rely on just copy-pasting stuff? It&#x27;s not quite clear to me.<p>Helm seems nice, but it&#x27;s another moving part to add to the mix. I&#x27;m leaning towards a simpler approach. I&#x27;ve looked into Deis Workflow, but it&#x27;s actually a full-blown PaaS, and seems a bit much.
评论 #13684174 未加载
dustinmoris大约 8 年前
Kubernetes is really cool. The only bad thing I can say about Kubernetes is that it has &quot;uber&quot; in its name.