Gardener: Manage Kubernetes clusters across multiple cloud providers
gardener.cloud
gardener.cloud
I've been trying to build a minimal kubernetes cluster in our lab to see what it would take to host this kind of infrastructure. It's not clear if we are allowed to use the public cloud yet. (We are a bank, yeah, I know)
I've tried, at least:
- kubeadm
- rancher
- canonical kubernetes
- canonical kubernetes core
- some random internet recipes
And for some IaaS: - cloudfoundry
- openstack
- cloudstack
- opennebula
- ganeti
Not one has worked out of the box in our environment. Every single one expects to have a direct connection to the internet. Any proxy in the middle creates havoc.
I've been able to hammer some of this solutions until the cluster started and had some pods or VMs running, but it feels like this are not ready for production or not for 'secure' on-premise deployment.
The deployment worked, I guess, because we had something similar to an `iso` locally to do the full install. After that, if you are not using a local registry, you get to some of the same problems I mentioned in another response.
Another problem we saw with Openshift was that it was not clear how we would be able to integrate the networking with our legacy infrastructure. If everything is working inside the cluster or, the rest of your infrastructure is kind of SOA, I guess it wouldn't be a problem, but as I mentioned... we are a bank :D
What is trying to connect to the public internet?
(If you mean that they expect a direct connection between client machines and servers, then, yes, they probably do and that's not a scenario I've run into personally.)
Once the cluster started, again, you have to find which tool is trying to use the proxy and now can't connect with the rest of the cluster. Sorry I can't be more specific, I gave up with this some months ago. I don't think we have the scale for Openstack.
Same problems, maybe in different steps, occurred with the other tools.
To solve the `docker pull` problem, we are trying with Nexus to proxy the global registry. But given that some of the scripting/tools that deploy kubernetes do some magic starting things that we can't directly control, we can't configure docker to pull from a proxy (not that we have found how to tell the stupid thing how to avoid going to the global registry and only use our proxy/registry). Once again, when we finally managed to pull those images, we have to guess how to unconfigure proxies to be able to fully connect the cluster.
The connection between clients and servers is another concern we haven't yet got to, but we can see it won't be a simple solution.
I would expect some installer shell script not to work well, yes. If you can mirror repositories internally (or configure apt/yum/whatever to work with the proxy), that should be fine... we've deployed one OpenStack instance using (more or less) pip and one using Debian packages.
Nothing in our running infrastructure attempts to connect to the external internet.
> Not one has worked out of the box in our environment. Every single one expects to have a direct connection to the internet. Any proxy in the middle creates havoc.
Same. I had to go home and do half the setup disconnected from the VPN so I could download anything without the proxy screwing it up. Something about the google storage servers on IPv4 screws with connections. I'm still waiting for the god security team to fix it.
I'm busy deploying 1.6 at a financial institution, and thinking about the 2.1 upgrade to Kubernetes. The Rancher team have been great so far.
https://rancher.com/docs/rancher/v2.x/en/installation/air-ga...
It just works...
It's because the kubelet is trying to downloading static pods (i.e. docker containers) from the internet. If you're using coreos, it's likely rkt is trying to download flannel (if you're using it) and the hyperkube container from the internet too.
Good news, all this is configurable. Bad news, it's no longer really a turnkey solution.
For the most part, bootstrapping kubernetes just from the hyperkube isn't that difficult. You just have to change the static manifests for the apiserver, controller, scheduler and the proxy to point to your private registry. You then need to change the kubelet(s) to use a private registry for the --pod-infra-container-image. This should probably be enough to get you up and running.
With kubeadm (1.8+) you can use imageRepository: <private-registry> in kubeadm config file.
http://v1.uncontained.io/playbooks/installation/#design-for-...
This could be used to deploy OpenShift Origin, the upstream of the enterprise version
I worked on buildpacks in 2014, part of my job was to ensure that it worked in disconnected environments. These days every single version of Pivotal Application Service and all of our other software products are tested together in public and private cloud configurations. For every single release[0].
We already have many large private installations at the largest banks, insurers, telcos, healthcare and automotive companies in the world. And we are able to connect you with your peers in the industry to get their views on whether to pick Cloud Foundry or an alternative.
I'm happy to put you in touch with our field folks (my email is jchester@pivotal.io) if you like.
[0] https://content.pivotal.io/blog/you-deserve-a-continuously-i...
Start the conversation now with your networking folks about a more transparent setup.
BOSH is also used to deploy Cloud Foundry and a bunch of data services (RabbitMQ, Redis etc). It has the advantage of having been under continuous development for 7 years, with backends (CPIs) for most IaaSes being provided by the IaaSes themselves.
I work for Pivotal, we sponsor most of the work done on BOSH. As it happens, SAP released an experimental BOSH CPI for Kubernetes[1] and there is work underway to make that experience smoother[2].
[0] https://docs-cfcr.cfapps.io/
[1] https://github.com/SAP/bosh-kubernetes-cpi-release
[2] https://www.dropbox.com/s/6jv9su650a76qmq/BOSH%20Kube%20CPI-...
As for the bunch of data services, I guess it's only a matter of time until you see a cambrian explosion of productive operators. I mean this non-comprehensive list [4] is already impressive.
SAP works in many projects where obligations with long term commitments have to be kept. And that is ok. BOSH CPI is one experiment to get CF on K8s. Have a look at the one which seems more attainable [6]. But these activities are an indicator of the elephant in the room, namely CF & K8s: Will it blend? [5]
I work for SAP in the inter-junction of SaaS, PaaS & IaaS and K8s.
[0] https://github.com/kubernetes-sigs/cluster-api
[1] https://github.com/kube-node/nodeset
[2] https://github.com/gardener/machine-controller-manager
[3] https://github.com/kubeup/archon
[4] https://github.com/operator-framework/awesome-operators
[5] https://www.youtube.com/watch?v=4ow7IumxkOM
[6] https://docs.google.com/document/d/1qs6UQQDWMkfOpY19XqS3CfvI...
> Maybe you could implement BOSH as implementation of the machine spec and integrate into K8s, the other way round than KuBo?
This is being investigated too. The main difficulty (as Brendan Burns has noted for virtual kubelet) has been that Kubernetes, ostensibly providing a smooth abstraction away from machines, actually has layer-breaking assumptions about the existence machines after all.
Cloud Foundry always had BOSH to insulate it from that concern. But BOSH-on-K8s was not super pretty in the early days, because they had overlapping concerns (mostly disks, I believe).
Kubernetes-on-BOSH is a natural fit. Standing up large distributed systems on IaaSes is BOSH's bread and butter. More to the point, that is its sole focus. Its mission is not spread amongst a cambrian explosion of alternatives (almost all of whom, you may recall, went extinct).
But in any case, it's doable. Which has the nice property that as the cluster API matures, BOSH will happily take workloads that run on VMs and run them on pods. The same experience we have today -- run an upgrade, everything is upgraded, nobody bats an eye -- will be exactly the same.
> But these activities are an indicator of the elephant in the room, namely CF & K8s: Will it blend?
If you look at the community activity, the answer is pretty clearly yes: Diego can be placed behind an OPI (Project Eirini) and CF itself can run control-plane components in containers instead of VMs. Personally I am all for it.
But as you pointed out, enterprise vendors need to keep their word. Adopting Kubernetes isn't a button-press operation. We need to prove that CF-on-K8s is at least as safe and performant as CF-on-Diego has been. Your customers, and Pivotal's customers, and IBM's customers, and SUSE's customers, expect all of us to provide the roadmap and prove that it is something they can bet a company on.
I mean, either I have to deploy Bosh or Kubernetes (to deploy more Kubernetes clusters, because that's what we are speaking of here). Kubernetes is now commodity. The idea is to place Kubernetes control planes into Kubernetes clusters (like it became good practice to deploy the OpenStack control planes) and benefit from all the advantages Kubernetes brings along. No need to go for another tool, but there are more points: - First off, Bosh is no thing in the Kubernetes community – it is primarily a tool used in the context of Cloud Foundry. - By using Kubernetes to manage itself you have less components, less learning. It is there already and everybody who works with Kubernetes doesn’t need to pick up yet another technology. - Bosh provisions VMs, which are slow to provision. What takes minutes with Bosh, takes seconds with Kubernetes. - VMs lead to massive fragmentation as they are mostly under-utilized and in the worst case over-utilized. - Bosh can’t scale processes as it commandeers only VMs, while in Kubernetes everything is a pod/container that can scale up or out automatically using the VPA/HPA. - Using the Bosh Kubernetes CPI has other disadvantages we can discuss in breadth, but I don't think we should, because its experimental at best and I know no installation actually running on it. - Bosh can’s scale VMs automatically, while Kubernetes can. If the cluster is nearing saturation, the cluster-autoscaler provisions more VMs on-the-fly (or shrinks the cluster back). - Bosh uses outdated Monit to watch over single processes, while Kubernetes pods are managed by the container engine on the lower level and by Kubernetes itself on the higher level. - Bosh depends on rather large Ubuntu-based or CentOS Pivotal stemcells (with the Bosh agent) and Pivotal updating them, while there are much light-weighter options like CoreOS Container Linux and no lock-in (you can take almost any OS). - Bosh packages all software into proprietary Bosh Releases and doesn’t isolate the VM processes, while with Kubernetes you create individual images and run them as isolated containers.
The list goes on and on and it is unlikely that Bosh can catch up again (the Pivotal IPO statement seems to indicate the same as major risk [1]). Kubernetes is the new virtualization layer and is made to run software reliably with minimal TCO. I have seen this in practice - Kubernetes is absolutely amazing - also/especially for these types of workloads.
[1] https://techcrunch.com/2018/03/23/pivotal-software-files-for...
> By using Kubernetes to manage itself you have less components, less learning. It is there already and everybody who works with Kubernetes doesn’t need to pick up yet another technology.
If you're running Kubernetes on-prem, you still need to solve how to manage the Kubernetes control plane. Kubernetes-on-Kubernetes doesn't make that vanish.
> Bosh provisions VMs, which are slow to provision. What takes minutes with Bosh, takes seconds with Kubernetes.
BOSH provisions anything for which there is a CPI. Virtual machines, hardware, Kubernetes containers.
Some folks will go directly to virtual kubelets. A lot of folks won't. For on-prem they will need to solve the bootstrapping problem to get to the first install of Kubernetes. Even GKE, pretty much the gold standard public service, is still creating VMs for you.
> VMs lead to massive fragmentation as they are mostly under-utilized and in the worst case over-utilized.
And you've never over or under provisioned a container?
> Bosh can’t scale processes as it commandeers only VMs, while in Kubernetes everything is a pod/container that can scale up or out automatically using the VPA/HPA
BOSH is a purely operator tool. Kubernetes is not very clear about where it wants to draw the boundaries. At CF Summit a consistent theme was "we ought to use Kubernetes under the hood". At Kubecon a consistent theme was "hmmm ... maybe we should have a hood".
Scaling apps is up to whomever cares about them. On Kubernetes that's HPA or VPA or another autoscaler (I happen to work on an autoscaler that is for Kubernetes). On Cloud Foundry it's one of the several app autoscalers you can install.
> Using the Bosh Kubernetes CPI has other disadvantages we can discuss in breadth, but I don't think we should, because its experimental at best and I know no installation actually running on it.
Nobody wanted it, to be frank. Now they do and folks from Pivotal, IBM and I think SAP are working on it (as well as the cluster API).
> Bosh can’s scale VMs automatically, while Kubernetes can. If the cluster is nearing saturation, the cluster-autoscaler provisions more VMs on-the-fly (or shrinks the cluster back).
Kubernetes cannot scale its components. It needs an outside tool to manage its own components. A tool like BOSH, for example.
Or, in GKE, the cluster autoscaler. Which, again, spins up VMs, not containers.
> Bosh uses outdated Monit to watch over single processes, while Kubernetes pods are managed by the container engine on the lower level and by Kubernetes itself on the higher level.
BOSH monitors both processes and VMs. Monit is being aggressively retired in favour of BOSH Process Manager.
> Bosh depends on rather large Ubuntu-based or CentOS Pivotal stemcells (with the Bosh agent) and Pivotal updating them, while there are much light-weighter options like CoreOS Container Linux and no lock-in (you can take almost any OS)
This goes back to my point that Kubernetes has to run on something, and that it would be nice if that something is easy to manage. One way to do that is to totally relieve the operator of unnecessary toil.
The only way to ensure you have a consistent machine image is to ... have a consistent machine. Red Hat agree, which is why OpenShift has always run on RHEL. So if "lockin" means "totally opensource Linux distribution with profitable vendors who rapidly backport fixes for years in very short timeframes", you're locked in by everyone.
Our experience is that operators like the stemcell system. It's been a competitive advantage for us. Red Hat's purchase of CoreOS -- which is much more BOSH-like than Ansible -- is not a coincidence.
> Bosh packages all software into proprietary Bosh Releases
This is flatly wrong.
Releases are opensource. By default they're published to bosh.io and rely on having a public git repository.
> and doesn’t isolate the VM processes, while with Kubernetes you create individual images and run them as isolated containers.
Or you tell your deployment to spread them across machines. On IaaSes that means different VMs. On Kubernetes it will mean different containers.
> The list goes on and on and it is unlikely that Bosh can catch up again
BOSH isn't trying to be Kubernetes, so there's no "catching up". It's a different tool that serves a different audience with laser focus. I might as well claim that Kubernetes "can't catch up" with BOSH.
It's because we listen to our customers that Pivotal has PKS. It's also because we listen to our customers that PKS uses BOSH for the compute, network and storage substrate. They are different tools and they solve different problems.
As I see the trends, Kubernetes will take over most of the workloads which BOSH is used for now. It's much easier to package a Helm chart than to construct a BOSH release, so it's only sensible to target the Helm chart. An increasing amount of control-plane components will be able to hoist themselves into containers, which reduces the things BOSH will supervise. At some point virtual kubelets will become the de facto compute API, which means that CPIs are no longer the primary abstraction layer.
Disclosure: I work for Pivotal.
It was for a proof of concept project, so I don’t know how it would perform in production but it was promising.