Kubernetes 1.4: Making it easy to run on Kubernetes anywhere
blog.kubernetes.io
blog.kubernetes.io
And lots more... please let us know if you have any questions!
[1] http://kubernetes.io/docs/getting-started-guides/kubeadm/ [2] https://github.com/kubernetes/helm/blob/master/docs/charts.m... [3] http://kubernetes.io/docs/user-guide/federation/
Disclosure: I work at Google on Kubernetes
At the moment adding a Cloud Load Balancer per Project is probably not affordable in the smaller project scale (and it would make any PaaS useless). (I mean that is not a "big" problem, it's ok to build it myself (with less quality than you can ;))
But I wanna say Kubernetes is extremly good designed and the amazing part is, is that you can start with a really really really really small cluster (like 1 master 1 node) and later you can raise that pretty easily
It's really one command to do either - if you have trouble, please ping me (aronchick (at) google)!
Disclosure: I work at Google on Kubernetes
Then, you slowly start to spin up your new instances from 1 -> 10 -> 100 (or whatever). The traffic will split automatically because both apps have the same label/selector, and you control the amount by how many instances of each you have.
Disclosure: I work at Google on Kubernetes
(disclaimer: I'm the co-founder, looking forward to hear your thoughts and feedback!)
The "What is Kubernetes?" page [1] gives a very clear overview of Kubernetes that will make sense both to people who already know about containers in general and those who are new to the concept.
Can someone help me understand what type of person the homepage is targeted at? It just doesn't do anything for me. I'm mainly interested because I find that a lot of projects have very poor home pages, even if the rest of the project is awesome.
Perhaps that comes as consequence of Docker shooting for the all-built-in approach, but I'd like to see a better overview and ramp-up in the Kubernetes space – their "101" and "201" docs are laughable.
http://kubernetes.io/docs/getting-started-guides/kubeadm/
Disclosure: I wrote the doc (but don't work at Google) :)
I really doubt that they're targeting anyone who isn't familiar with the above and with as in flux and complex as kubernetes is right now (especially regarding documentation/the site) they probably shouldn't albeit deployment and management simplification seems to be a very important goal in the end.
The kube docs/pages are mostly just from the github repo. I doubt they've had much editorialization unfortunately.
Disclosure: I work at Google on Kubernetes
If you don't know that https://github.com/kubernetes/kubernetes.github.io/tree/mast... exists you're in for a bad time.
Disclosure: I work at Google on Kubernetes
There are also places where the content is too specific and not generally applicable. For example, this addon example that assumes you're using the kube-up convenience script: http://kubernetes.io/docs/getting-started-guides/logging-ela... No explanation of what the magic flag actually does, just "set this and run kube-up". (the real explanation is "copy the appropriate specs to your cluster addon directory")
If you've used k8s docs for any significant amount of time I can pretty much guarantee that you've encountered this.
Here's an example; limit-example.yml which is mentioned over and over in the limitrange docs but the file is nowhere to be found;
http://kubernetes.io/docs/admin/limitrange/
If you don't know about the kubernetes.io repo (which someone who has never gone through looking for missing docs will not know about) you'll think to look in the kubernetes repo on github for the missing file, where you think it will be;
https://github.com/kubernetes/kubernetes/tree/master/docs/ad...
Where it is; https://github.com/kubernetes/kubernetes.github.io/tree/mast...
Edit: I have been poor on submitting doc bug requests because I don't really know what the state of the docs are. If they just migrated, if they're working on cleaning up things, or what. I suppose I'll just start creating issues regarding them in the future.
edit: I just realized that's limit.yml, I'm not even sure where limit-example.yml is or if there's any difference. Like the go guys mentioned above, there are also a huge number of undocumented (on k8s.io) features that you'd only find by reading the go-defs.
I think any and all help is welcome on the docs, it seems to be a well-known weak spot.
Really glad to see a dead simple setup - I'm not exactly unfamiliar with operations or containers or Linux or anything, but a turnkey setup so I can play on my DO effortlessly to get an idea is really nice! And I only started looking recently, so having `kubeadm` available now is quite convenient.
That said, `kubeadm` is a great addition!
[1] https://github.com/kelseyhightower/kubernetes-the-hard-way
It is NOT a production-ready setup in any form. You should investigate which alternatives exist for your platform (e.g. GKE for Google Cloud, kops for AWS).
The setup scripts to turn a daemonized docker server into a cluster were all published as a docker image themselves.
So installation was mainly a docker run away whereas he used the shell evaluation of a subshell to start the actual docker run, e.g. $(docker run ...imagename) would print the actual docker command which will in turn contain volume mount options to the docker socket to help setting up the whole machine.
It was quite fascinating to watch this bootstrap method without relying on any package manager but solely a docker engine deployment.
So what I am saying this that this would be an interesting deployment approach for Kubernetes as well.
They also have an ansible based installation process that makes your cluster a lot more production ready than the basic Kubernetes scripts.
For me OpenShift is comparable to Heroku or Elastic Beanstalk where developers can deploy applications from source without knowing a lot about the underlying infrastructure. Of course you still need an ops team to manage OpenShift.
(I work on OpenShift and Kubernetes)
* every component will use client cert + TLS + specific authorization roles to interconnect
* no ability to configure the cluster without those on
* default to secure by default, be opinionated about authz/n
* lock down everything that could be abused (like letting end users change ingress IPs on services, or direct volume mounting)
* make namespaces the unit of tenancy and restrict regular users from modifying most things in namespaces that impact policy
The raw pieces are in Kube now, but effecting the same opinionated defaults while still preserving the flexibility many in the community want (like direct Keystone integration, or no restrictions on pods by default) will take some time. Our goal is to get there in a way that also makes Kube more extensible and flexible - I don't believe everyone needs everything we believe in, but by doing it in pieces we do get to ensure it's possible for someone else to do it.
https://github.com/kubernetes/kubernetes/blob/release-1.4/do...
I love kubernetes and I can't wait for the tooling to mature. I'm about to give 1.4 a spin and see where things stand.
Here is my take on the state of things:
1. Still very much in rapid development, with features coming at a breakneck pace. I think Kubernetes is sold as production ready a bit too hard - it takes a good amount of effort to make a cluster production ready for anything non-trivial. Expect to contribute PRs to fix the issues you run in. It's probably easiest to use GCE since this has the most active development, I think. Otherwise, Openshift (Redhat's production fork) for on-premise installation. AWS is in a somewhat working state, with many improvements coming (what I'm using).
2. The maintainers are very open to contributions and discussion. PRs are generally accepted within a couple weeks (and given the volume of issues/PRs this is quite amazing). kubernetes.slack.com is a great way to talk to many of the core developers. I wish they had a slack subscription, so we could search the very rich chat history. A lot of stuff is missed unless you read the chat rooms daily.
3. My impression, which could be totally wrong I admit, is that much of the discussion for big changes seems to happen among the core Google & Redhat engineers offline. I wish the project used an open mailing list for these discussions, or did it in Slack (with a slack subscription, so history is available), or some other recorded text means. I don't think the current mechanisms scale to the size of the project and needs of the users.
3b. A lot of time seems devoted to things like scaling to 1000+ nodes, when fundamental things like kube-proxy are broken for basic use cases, in my opinion (kube-proxy uses an iptables hack for VIPs which leads to problems like the connection tracking table filling up and broken keepalive connections during deployments).
4. The provisioning scripts provided were traditionally pretty poor, kube-addons is a broken shell script mess. Fortunately, this is improving quickly. kops/kubeadm help with the provisioning, coreos is doing lots of work here as well, daemonsets to replace kube-addons, and so on. So this area is improving quickly. But expect to do work here if you're serious about using Kubernetes for prod. I'm using ansible/terraform for this.
5. Ingress (external access to your cluster), is still adhoc. This requires custom dev and testing to setup.
1. GKE (Google Container Engine, GCE is compute) lags weeks behind any k8s release so if you're looking for bleeding edge it really isn't the best system, you're better off managing the cluster yourself. GKE being bumped to a recent version seems to be a private matter decided by a few Google employees, so you're never sure at all when you're going to get 1.37 or whatever version that is multiple sem-minors behind. It seems like it's usually about 2-3 weeks but I've never found any discussion or issues about its status so I wind up just checking every few days to see if it's been released. I have a mission critical feature that's being released (I hope) with 1.5 (IP persistence for sockets) and it'd be really nice to be able to follow the decision making process. Or at least have some understanding of what it entails (3 weeks of no major issues? GKE specific bugs? someone comfortable enough to release the hounds?)
5. I've had nothing but headaches with Ingress deployments. I'd wager it's by far the most brought up topic on the k8s slack. The documentation is all over the place and it seems like every example is completely different from the last, albeit there's never any explanation as to why exampleA is different from exampleB but does the same thing. Then you throw in annotations that might be required and IIRC unless you're reading the go docs you wouldn't know anything about them.
Said article:
https://medium.com/@elcct/kubernetes-on-bare-metal-part-5-ku...
and the ticket:
Release blog of kubernetes brought to you by: -- Aparna Sinha, Product Manager, Google.
Seriously though those new features are really neat, and seems to compete with the ease of setup of docker 1.12(though swarm was a bit of a mess when I last tried to make something useful of it (docker 1.12.0)), I hope I can test them at work soon.
For now I'm having a great time with rancher.io and cattle.
Disclosure: I work at Google on Kubernetes.
There could even be a conflict of interest: the Kubernetes developers are primarily sponsored by Google, which has an interest in promoting its own cloud offerings over those of their competitors. (Note the relative difficulty of setting up K8S on EC2; even if you can set it up, K8S assumes the ability to create a network topology that's unique to GCE; otherwise you have to use overlay network hacks.)
The google teams goals (seen from the outside) have been to built a phenomenal system for running applications that is stable, reliable, makes app author / maintainers lives easier, and will succeed as an open source ecosystem. If we have disagreed, it's more in the details of what to prioritize in the short term to succeed broadly (features, scale, ease of install, ease of running existing Docker images, etc). We haven't always picked right - but it's not for lack of trying.
EDIT: And I have certainly "forced" things that I felt certain audiences need into Kube by convincing other contributors over their initial objections. I can't think of a place where a reasoned argument has not carried the day, ever.
1) The people on that page all contribute mightily to the project in various ways - we wouldn't be where we are without them. We take feedback from everyone (we have over 15 special interest groups, many led by non-core team members). 2) K8s developers are most definitely not primarily sponsored by Google - more than 60% of K8s devs are NOT Googlers. 3) Overlay networks are definitely not a hack - many partners set them up with great benefit. The fact is networking is hard (tm), and unless you're just looking for a flat network, then you're going to have to use SOMETHING.
Disclosure: I work at Google on Kubernetes
From an analysis of all commits in the k8s (main) repo this is the data I am getting about domains and the breakup of which users under which domains commit/author the most.
-----------------------
Top 20 author (domains)
-----------------------
google.com => 16825
gmail.com => 8220
redhat.com => 4051
fathomdb.com => 501
bedafamily.com => 420
coreos.com => 398
huawei.com => 352
raintown.org => 269
zte.com.cn => 183
mesosphere.io => 172
zju.edu.cn => 140
apache.org => 126
mirantis.com => 72
hotmail.co.uk => 67
amadeus.com => 67
163.com => 64
us.ibm.com => 64
tmrts.com => 44
box.com => 43
canonical.com => 42
--------------------------
Top 20 committer (domains)
--------------------------
google.com => 16655
gmail.com => 7130
redhat.com => 4065
fathomdb.com => 493
bedafamily.com => 419
coreos.com => 388
huawei.com => 348
raintown.org => 268
zte.com.cn => 180
mesosphere.io => 174
zju.edu.cn => 131
apache.org => 121
amadeus.com => 66
163.com => 65
us.ibm.com => 64
hotmail.co.uk => 63
mirantis.com => 63
ebay.com => 53
box.com => 43
tmrts.com => 42
Btw you (google?) should really invest in something like http://stackalytics.com/ if the community wants to have good transparency around this type of data.Crappy script to generate that data @ https://gist.github.com/harlowja/aca0b3c7d94c78014798fd9eb88...
We think it's more important around # of unique contributors, where we (Google) are <50%.
For Stackalytics - http://stackalytics.com/?project_type=kubernetes-group&metri...
Looks like my 60% number is out of date - looks like we (Google) are up to 44%. I'll have to figure out why.
Disclosure: I work at Google on Kubernetes
If you're claiming that Google has delegated authority over Kubernetes to the open-source community, and therefore is not in a position to place its needs over those of the community, please say so explicitly here.
Why quibble over statistics when we can get an official statement?
That is not to say we (Google) do not continue to be deeply invested in its success (it's the core of our Google Container Engine), and, further, human beings who are also employed at Google _are_ core contributors to the project, but Google is not associated with the project.
[1] https://www.linuxfoundation.org/news-media/announcements/201...
Disclosure: I work at Google on Kubernetes
The key metric, in my view, is how many of them can approve PRs into master. How many of them are not Googlers?
Moreover, what would happen if a PR arrived that might make K8S incompatible with GCE, but be otherwise better for everyone else? I am certain it would be summarily rejected by Google.
> Overlay networks are definitely not a hack - many partners set them up with great benefit. The fact is networking is hard (tm), and unless you're just looking for a flat network, then you're going to have to use SOMETHING.
I respectfully disagree. The use of multiple IP addresses per node is a hard requirement of K8S, even though it is arguably unnecessary in environments whose servers can be bound to arbitrary ports.
By doing so, K8S made an explicit tradeoff that was better suited to Google's cloud offering than others'. I'm not saying it was the wrong decision; I'm simply saying that it forces complexity on those who operate in single-IP-per-host environments. (In case you think I'm unfairly laying blame, I point the finger equally at AWS and other cloud providers who refuse to make it simple to allocate a useful number of IP addresses per instance.)
I maintain my characterization that overlay networks are a hack: they make tracing more complex (tcpdump doesn't natively understand VXLAN or decapsulate their frames); they are compatible with few (if any) NetFlow analyzers (which are often used by orgs who use them for IDS and other purposes); and they add overhead to packet processing, particularly in virtualized environments that don't support VXLAN hardware offloading.
I do still want to see more solid work done for programmable BGP (calico) and programmable iptables (Contiv) and even programmable routers (it's not that hard to program routers on the fly today, just incredibly specific to each technology).
I also look forward to being able to exploit tools like ECMP more effectively within the cluster to do L3 load balancing and DSR - much of that would be a lot harder without being able to rely on endpoints everywhere.
https://insights.ubuntu.com/2016/09/27/canonical-expands-ent...
Disclosure: I work at Google on Kubernetes.
Yet another complex framework.
sigh
Fleet for dnyamic scheduling
Consul for k/v service discovery
Registrator to actually populate consul
Confd to talk to consul so you can configure your containers
...
Oh wait I seem to be building a crappy more involved version of kubernetes.p.s. I actually did the above. kubernetes is a better solution.
As a low level building block it is/was more flexible in some ways. Of course it is solving only a tiny part of what Kubernetes tries to solve.