Live data from Hacker News

Docker for Mac with Kubernetes

docs.docker.com

101–110 of 169 posts

Re: Docker for Mac with Kubernetes

#101

So confused by all the posts from people who say they run Swarm because kubernetes is too complicated or is only for huge deployments. I’ve had all sort of difficulties installing Docker. By hand it’s not trivial to get a secure install. Docker machine is great except it’s often broken. The Docker machine dev team is a tired, understaffed bunch that’s always playing a sisyphean whack-a-mole against dozens of cloud pr…

> Kubernetes on the other hand is trivial with GKE How do I install GKE on my servers? ;) > By hand it’s not trivial to get a secure install. The default install (basically, adding a repo and apt-get install docker-ce on Debian and derivatives - trivial to automate with Ansible) is reasonably secure if you view Docker as a tool for packaging and task scheduling with some nice extras and don't buy the marketed isolati…

> How do I install GKE on my servers? ;)

Great question! All major Cloud providers offer managed Kubernetes services:

https://cloud.google.com/kubernetes-engine

https://azure.microsoft.com/en-us/services/container-service

https://aws.amazon.com/eks

https://www.ibm.com/cloud/container-service

The choice is Cloud + Kubernetes vs. roll everything on your own hardware.

Running your own hardware is a major IT effort. Kubernetes is just a part of that effort. Then you have take care about planning, provisioning, logging, monitoring, alerting, auditing, networking, storage, oncall.

You either run Cloud + Kubernetes and get rolling in 15 minutes, or you hire IT headcount.

Re: Docker for Mac with Kubernetes

#102

Earlier quoted context omitted.

> Kubernetes on the other hand is trivial with GKE How do I install GKE on my servers? ;) > By hand it’s not trivial to get a secure install. The default install (basically, adding a repo and apt-get install docker-ce on Debian and derivatives - trivial to automate with Ansible) is reasonably secure if you view Docker as a tool for packaging and task scheduling with some nice extras and don't buy the marketed isolati…

Thanks for the reply. I agree with what you say. I'm not tying to say people should all jump to k8s. Having options on the market is great. But I was trying to refute the notion that Kubernetes has no advantages unless you're running a huge cluster. My main points where: * It works great with 1 node. * It comes with many features that Swarm does not have that are useful even at 1 node (PersistentVolumes, StatefulSets…

> Kubernetes has no advantages unless you're running a huge cluster.

You're absolutely correct. Kubernetes has its advantages, even in a single-node setup. What many others are pointing out is that it also has significant disadvantages, too.

> but then you want to control it remotely, right?

By the way, I do talk to Docker (Swarm mode or standalone) deployments remotely, forwarding the socket via SSH.

    ssh -nNT -L /tmp/example.docker.sock:/run/docker.sock example.org
    docker -H unix:///tmp/example.docker.sock info
(Needs user to have access to the socket, of course. If sudo with password-requirements is desirable, `ssh + sudo socat` is a viable alternative.)

But, really, there is Ansible for this. Declare `docker_service` and get it deployed (or updated) as a part of the playbook. And ELK (with logging.driver=gelf for the containers or application-level) for logging.

(BTW, what's nice about K8s is that IIRC it allows to exec into pods with just `kubectl exec`. With Swarm you need some script to discover the the right node and container ID, SSH into it and run `docker exec` there - no remote access.)

Re: Docker for Mac with Kubernetes

#103
post #101

Earlier quoted context omitted.

> Kubernetes on the other hand is trivial with GKE How do I install GKE on my servers? ;) > By hand it’s not trivial to get a secure install. The default install (basically, adding a repo and apt-get install docker-ce on Debian and derivatives - trivial to automate with Ansible) is reasonably secure if you view Docker as a tool for packaging and task scheduling with some nice extras and don't buy the marketed isolati…

> How do I install GKE on my servers? ;) Great question! All major Cloud providers offer managed Kubernetes services: https://cloud.google.com/kubernetes-engine https://azure.microsoft.com/en-us/services/container-service https://aws.amazon.com/eks https://www.ibm.com/cloud/container-service The choice is Cloud + Kubernetes vs. roll everything on your own hardware. Running your own hardware is a major IT effort. Kube…

EKS isn't generally available

Re: Docker for Mac with Kubernetes

#104

Earlier quoted context omitted.

GKE=Google cloud? I don't understand ur comment, yea using something in preinstalled in the cloud is easier than installing something on your own.

GKE = Google Kubernetes Engine (aka Google Container Engine for Kubernetes on Google Cloud Platform) https://cloud.google.com/kubernetes-engine/

[deleted]

Re: Docker for Mac with Kubernetes

#105

So confused by all the posts from people who say they run Swarm because kubernetes is too complicated or is only for huge deployments. I’ve had all sort of difficulties installing Docker. By hand it’s not trivial to get a secure install. Docker machine is great except it’s often broken. The Docker machine dev team is a tired, understaffed bunch that’s always playing a sisyphean whack-a-mole against dozens of cloud pr…

Have any recommended resources for learning Kubernetes? I've looked at it a few times, but it always seemed rather intimidating.

Interactive tutorials from katacoda: https://www.katacoda.com/courses/kubernetes

Re: Docker for Mac with Kubernetes

#106

Earlier quoted context omitted.

> Kubernetes on the other hand is trivial with GKE How do I install GKE on my servers? ;) > By hand it’s not trivial to get a secure install. The default install (basically, adding a repo and apt-get install docker-ce on Debian and derivatives - trivial to automate with Ansible) is reasonably secure if you view Docker as a tool for packaging and task scheduling with some nice extras and don't buy the marketed isolati…

Thanks for the reply. I agree with what you say. I'm not tying to say people should all jump to k8s. Having options on the market is great. But I was trying to refute the notion that Kubernetes has no advantages unless you're running a huge cluster. My main points where: * It works great with 1 node. * It comes with many features that Swarm does not have that are useful even at 1 node (PersistentVolumes, StatefulSets…

> Docker is not trivial to set up, either.

Do you have a concrete example of what you ran into? What do you mean by "secure install"?

on osx its just a matter on installing docker4mac and other linux distributions has pre-made packages. I am a linux noob and I was able to setup a 20 machine cluster with swarm trivially on centos7.

I was acutally surprised that I was able to do that so trivially, given I have minimal linux admin experience if any.

Re: Docker for Mac with Kubernetes

#107
post #101

Earlier quoted context omitted.

> Kubernetes on the other hand is trivial with GKE How do I install GKE on my servers? ;) > By hand it’s not trivial to get a secure install. The default install (basically, adding a repo and apt-get install docker-ce on Debian and derivatives - trivial to automate with Ansible) is reasonably secure if you view Docker as a tool for packaging and task scheduling with some nice extras and don't buy the marketed isolati…

> How do I install GKE on my servers? ;) Great question! All major Cloud providers offer managed Kubernetes services: https://cloud.google.com/kubernetes-engine https://azure.microsoft.com/en-us/services/container-service https://aws.amazon.com/eks https://www.ibm.com/cloud/container-service The choice is Cloud + Kubernetes vs. roll everything on your own hardware. Running your own hardware is a major IT effort. Kube…

> You either run Cloud + Kubernetes and get rolling in 15 minutes, or you hire IT headcount.

You can always rent dedicated hardware – much cheaper than renting similar amounts of virtual servers, and the same administration and operations costs. It’s often even significantly cheaper than what GCE offers – but of course, setting up Kubernetes is more complicated.

Re: Docker for Mac with Kubernetes

#108

Earlier quoted context omitted.

GKE=Google cloud? I don't understand ur comment, yea using something in preinstalled in the cloud is easier than installing something on your own.

Docker isn't easy to install (see my OP). Kubernetes is probably more difficult to install, but it's not more expensive to use GKE than to roll your own Kubernetes elsewhere. And once you understand Kubernetes from a user perspecitve, it's easier to set up on your own.

> it's not more expensive to use GKE than to roll your own Kubernetes elsewhere.

$13 per month per egress rule, bandwidth costs a factor of 100 more expensive than dedicated hosters, and costs for hardware 10x of what dedicated hosters offer.

I’m not sure what your definition of "more expensive" is, but compared to renting dedicated hardware (e.g., from Hetzner), or colocating, GKE is significantly more expensive.

Of course, if you’re on the scale of Spotify, you can get much better deals – but from what I see on https://cloud.google.com/products/calculator/, it’s not cost-effective.

Re: Docker for Mac with Kubernetes

#109

Earlier quoted context omitted.

Do you really find k8s useful for a single node deployment or were you just making an example? I haven't used but I have used DC/OS, Mesos, and Marathon extensively, which is not a setup I'd do for a small number of nodes personally.

Yes. Though I should emphasize that I'm using GKE. So it's zero config, zero ops. I am running a single n1-standard-2 node on GKE for a smallish app right now. Comes to 30-40 dollars a month all in (egress traffic, cloud storage, other services). I am working hard on getting people to use this app, and it's great to know that scaling will be best-in-class if I succeed. But I stress it's not about the scaling. It's ab…

Yet with a Docker Swarm setup, you could get away with probably 10 dollars/month. K8s likely taking more resources than your app containers is why k8s may not be the best option for single node deployments.

I've personally tried both orchestration options and much prefer Swarm to smaller deployments. Sure k8s could prepare you better for the future if your app takes off to the moon but that's just premature optimization.

Re: Docker for Mac with Kubernetes

#110

Earlier quoted context omitted.

Do you really find k8s useful for a single node deployment or were you just making an example? I haven't used but I have used DC/OS, Mesos, and Marathon extensively, which is not a setup I'd do for a small number of nodes personally.

>I have used DC/OS, Mesos, and Marathon extensively Would you use DC/OS-marathon (vs k8s) now if you were to make that decision now. I've heard that mesos stack is good for machine learning/big data stacks but how does marathon compare for deploying webapps.

I've run 2 Mesos stacks in production and have experience setting up a k8s stack (on prem). First off in my experience k8s ops is way more complex that the DC/OS stack. I recently setup a new DC/OS deployment (80% of the cluster resources was Spark, which works natively with Mesos and I'd rather run the ancillary services on Marathon, then spend another 80% of my time on k8s). If I didn't have the Spark requirement I would have went k8s.

Despite going with mesos I really had to contend with the fact that k8s just has way, way more developer support - there are so many rich applications in the k8s sphere. Meanwhile I can probably name all the well supported Mesos frameworks offhand. Next, marathon "feels" dead. They recently killed their UI interface as I imagine that they are having trouble giving resources to marathon. 3 years ago I wanted a reverse proxy solution that integrated with mesos as well as non-mesos services so I hacked Caddy to make that work [1]. 3 years later, I was looking for a similar solution and found traefik. It claimed to work with mesos/marathon, but the marathon integration was broken and the mesos integration required polling even though mesos had an events API, so I hacked traefik to make that work [2]. On the other side of the fence, you have companies like Buoyant who rewrote a core piece of their tech (Linkerd) just to support K8s (and only K8s). This has a compounding effect, where over the years things will just become more reliant on assuming you are running k8s.

That "cost" you pay to setup Mesos/k8s is usually a one time cost on the order of a month. I feel however, that k8s is going to give you a better ROI (Unless, you are managing 100s of nodes with Spark/YARN/HDFS, then Mesos continues to be the clear winner).

[1] https://github.com/mholt/caddy/pull/40 [1] https://github.com/containous/traefik/pull/2617

Post reply on HN