12 ms·
Docker for Mac with Kubernetes
- stephenr 9y agoI don't understand the use-case here. You want to use Docker+Kubernetes but can't work out the bits to run it in VM's on your own?
- aequitas 9y agoA use case would be for Devops to be able to just point developers to a simple and documented method of running this environment in development without having to invest the time into creating and maintaining it themselves or expect the developers to invest into the operations aspects.
- watoc 9y agoIf you need to experiment with k8s locally it's pretty easy to install Kubernetes in one or 2 VMs on your laptop with kubeadm but then you need to install Docker inside this VM. Minikube is also installing another Docker daemon inside their own VM. Because I already have Docker for Mac installed to be able to build and test images I think it's useful to have this local k8s integration.
- eicnix 9y agominikube is still my default for running a local kubernetes instance since it supports more customisation of the k8s settings.
- zenlikethat 9y agoRunning Kubernetes locally isn’t really trivial. I feel like this makes a clicky clicky install a lot more possible and opens the doors to more people. And that’s what Docker’s been good at since day one, democratizing otherwise esoteric technologies.
- brown9-2 9y agoI don’t get it either. minikube is trivially installed in my experience with homebrew. Given that running docker on a Mac has been a long and bumpy journey, I’m not sure I’d want to bundle the two together. What am I missing?
- theptip 9y agoIf I don't have to run minikube, and instead get something equivalent just by installing Docker for Mac, that's a minor win. If Docker's local Kubernetes install provides a way to connect to custom registries (e.g. GCR) without installing a third party plugin onto every minikube, I'd consider that a major win. https://github.com/kubernetes/minikube/blob/master/docs/insecure_registry.md#private-container-registries https://github.com/kubernetes/minikube/blob/master/docs/inse...
- guillaumerose 9y agoThanks for the suggestion. We will look at it.
- theptip 9y agoThis is a replacement for minikube, i.e. a local dev k8s cluster.
- alexellisuk 9y agoI normally used minikube for openfaas development - I appreciate the efforts of the project, it's an invalueable tool. The DfM integration works very well for local development and I've got some screenshots below: https://twitter.com/alexellisuk/status/949595379326210048 https://twitter.com/alexellisuk/status/949595379326210048 Make sure you do a context-switch for kubectl too. I see some people talking about Swarm vs Kubernetes. Swarm has always maintained a less modular approach which made it simpler to work with - it's obviously not going anywhere since there are customers relying on it in production. Out of the two it's the only one that can actually fit into and run on a Raspberry Pi Zero because K8s has such high base requirements at idle in comparison. For a better comparison see my blog post - https://blog.alexellis.io/you-need-to-know-kubernetes-and-swarm/ https://blog.alexellis.io/you-need-to-know-kubernetes-and-sw...
- abusaidm 9y agoThank you for your blog, it's a great source of knowledge for docker, kubernetes, and swarm, also love the openfaas
- fapjacks 9y agoI find that Swarm is the only thing that fits my use case of just shipping. There's so much complexity and overhead with kubernetes and often I just want something that works so I can ship it. You just can't beat Swarm for building an insta-cluster that works well and quickly gets you where you want to be. I'm sure kubernetes is great if you have forty datacenters around the globe, but I don't, and neither does anybody I'm building services for.
- deleted 9y ago[deleted]
- driton 9y agoHave you ever tried docker-compose? While the two solutions are obviously with different goals in mind, one being to fully run the kubernetes setup locally, and the other one to run a few docker containers who talk to one another, if it's for the purpose of running a simple-ish dev environment, in my experience, docker-compose is much faster and simpler than minikube.
- pacavaca 9y agoWow! Did Docker give up swarm? I thought there was a time when Docker didn't like the existence of k8s all that much. Anyways, I envision this being very useful for development, may even replace my docker-compose based test setup.
- frik 9y agoDocker was in other news yesterday, though it got flagged: https://news.ycombinator.com/item?id=16074264 https://news.ycombinator.com/item?id=16074264
- bboreham 9y agoOfficially, both Swarm and Kubernetes are valued features of Docker. Swarm was always much simpler to get started with, so some people will prefer it. But it's clear to me which one won.
- sandGorgon 9y agoYour docker compose yml is trivially reusable for Swarm. We run it in production and is spectacular . The complexity overhead of kubernetes may be premature when you don't have massive requirements
- pacavaca 9y agoThat's the thing, we use k8s in production and I just used docker-compose for testing in my device environment for the sake of simplicity. Though over time it became not so simple to maintain two parallel config as the system grown up.
- sandGorgon 9y agothat's one of the reason we decided to jump on swarm. And seeing how Swarm has matured and added features, we are very happy. Azure also comes with a Swarm-mode deployment template which is pretty great (https://github.com/Azure/acs-engine/blob/master/docs/swarmmode.md https://github.com/Azure/acs-engine/blob/master/docs/swarmmo...). However, setting up and running Swarm has been a pleasure.
- daveevad 9y agoAnyway to get this feature without updating to High Sierra first?
- bboreham 9y agoWhich feature? If you want a standalone installation of Kubernetes on a Mac try minikube. https://kubernetes.io/docs/getting-started-guides/minikube/ https://kubernetes.io/docs/getting-started-guides/minikube/
- guillaumerose 9y agoKubernetes is enabled for all OSX version
- bartvk 9y agoMinor nitpick, it's called macOS now.
- switch007 9y agoI don't understand why people refer to pre-Sierra releases as macOS. Sierra and onwards is called macOS. guillaumerose was referring to all versions, so both "all OS X versions" and "all macOS versions" would be wrong, no...?
- konart 9y ago>I don't understand why people Because it's a bother to keep in mind when they introduced the new name? Or release names? It's hard to imagine that someone would actually be talking about certain number of releases this way. PS: Apple's stupid marketing bs strikes again.
- alangpierce 9y agoApple rebranded "Mac OS X" to "OS X" and later rebranded that to "macOS". It's not like they're different lines of operating systems; it was a rename of the whole line, so my impression is it's fine to use the term "macOS" to refer to any of the versions since 2001, or it's also fine to use the name that was given at release when referring to a specific version. In other words, probably best to not worry about any particular phrasing, and not try to put exact technical meaning on any of these terms. :-) For example, Wikipedia[1] has a page called "OS X Yosemite" which describes it as "A version of the macOS operating system", and the Wikipedia article on macOS[2] says it was first released in 2001. [1]: https://en.wikipedia.org/wiki/OS_X_Yosemite https://en.wikipedia.org/wiki/OS_X_Yosemite [2]: https://en.wikipedia.org/wiki/MacOS https://en.wikipedia.org/wiki/MacOS
- perceptronas 9y agoDocker for Mac is not usable today, because of high cpu due IO [1] [1] https://github.com/docker/for-mac/issues/1759 https://github.com/docker/for-mac/issues/1759
- dfee 9y agoOh man. Thanks for sharing this. I thought it was just my Mac.
- aeonflux 9y agoI have a Dropbox running inside a container on my Mac. Even though there is minimal activity on the account it drains the battery like crazy. Native Dropbox client isn’t great in that regard, but it feels like there is an order of magnitude difference.
- paulsmal 9y agoDocker for Mac is running in VM anyway, these kind of issues related to slow IO was around more than year. Main reason I run linux on my macbook
- ai_ja_nai 9y ago#metoo
- zenlikethat 9y agoNot appropriate
- watoc 9y agoI've never noticed this issue with the stable version. However I'm experiencing high CPU usage whenever I start minikube on my Mac. I just installed Docker edge. We'll see how it goes in the long run but so far with k8s enabled hyperkit uses 25% of a virtual core.
- 9y ago
- amq 9y agoKubernetes is also coming to docker-ce: https://github.com/docker/docker-ce/releases/tag/v18.01.0-ce-rc1 https://github.com/docker/docker-ce/releases/tag/v18.01.0-ce...
- k__ 9y agoHalf-OT: Is it possible to run Xcode CLI tools from inside Docker for Mac?
- RantyDave 9y agoNo. Docker for mac runs a Linux VM.
- k__ 9y agoDoesn't that defeat the purpose of Docker? But anyway, thanks for the info :)
- OJFord 9y agoNo, because the purpose of Docker is not 'to run XCode CLI tools'...
- wz1000 9y agoI think the GP means that the purpose of Docker is to provide containers, which are a substitute for VMs. If you are going to be running a VM anyway, why run a container?
- k__ 9y agoYes. thank you.
- ianburrell 9y agoThe purpose of running Docker on Mac is to run Linux containers, mainly for developing or testing containers that will be run on Linux servers. macOS doesn't support native containers. Windows does have Windows containers. Docker on Windows can run both Linux or Windows containers.
- alangpierce 9y agoRunning a Linux VM on Mac defeats some of the purpose of Docker, but it's still valuable: * Docker is useful for production and has various other benefits, and Docker for Mac is a nice way to develop locally with Docker even if it's not as efficient as on Linux. * Docker for Mac uses some built-in virtualization tools in macOS to share network and filesystem more efficiently than you could do with the older VirtualBox approach. So it's maybe a little closer to native OS support than you're thinking. * A typical configuration has a single Linux VM holding many Docker containers, which is better than the alternative of many VMs.
- linkmotif 9y agoSo 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 providers and very needy posters on Github, myself included. Kubernetes on the other hand is trivial with GKE. It’s great for single node deployments. I run a single node on GKE and it’s awesome, easy, and very cheap. You can even run preemptible instances. The myth that kubernetes is complicated is largely perpetuated by the same kind of people who say React is complicated: the people who’ve not tried it. And like React, once you try kubernetes you never go back. Kubernetes is actually the orchestration equivalent of React. You declare what should be true, and Kubernetes takes care of the rest. And the features it provides are useful for any-sized application! If you try kubernetes you quickly discover persistent volumes and statefulsets, which take away most of the complexities out of stateful applications (ie most applications). You also discover ingress resources and controllers, which make trivial so many things that are difficult with Swarm, like TLS termination. Swam doesn’t have such features, which any non-trivial app (say, Django, wordpress, etc) benefits from tremendously.
- moondev 9y agoI agree for the most part, but kubernetes orchestrates docker (for now). It's also much easier to install than full blown k8s
- dominotw 9y agoGKE=Google cloud? I don't understand ur comment, yea using something in preinstalled in the cloud is easier than installing something on your own.
- tedmiston 9y agoGKE = Google Kubernetes Engine (aka Google Container Engine for Kubernetes on Google Cloud Platform) https://cloud.google.com/kubernetes-engine/ https://cloud.google.com/kubernetes-engine/
- abusaidm 9y agoOnce kubernetes become stable in docker ce can one attempt to run their own cluster on baremetal?
- eggie5 9y agoDoes this obviate minikube?
- InTheArena 9y agoFor me, yes. I just deleted my minikube and mini shift directories.
- eggie5 9y agosounds good to me!
- sigjuice 9y agoThe phrase "Docker for Mac" is super misleading. If we run Docker in a Linux VM on macOS, I don't think it counts as "Docker for Mac", IMHO. Docker is primarily for running Linux applications on Linux (yes, I know there are things like Joyent SDC, Docker Engine on Windows etc).
- Exuma 9y agoOne of my engineering friends told me he didn't use Kubernetes in the past because there was a single point of failure with it for distributed setups. I really wish I could remember what SPOF was pertaining to, but I just can't remember. Does anyone have any idea if this is still relevant/accurate information? He told me this maybe 2-3 years ago, so I was wondering how things have changed since then, or if anyone knows what he might have been talking about.
- brobinson 9y agoMulti-master? Kubespray supports multi-master deployments now.
- atombender 9y agoKubernetes supports HA masters now: https://kubernetes.io/docs/admin/high-availability https://kubernetes.io/docs/admin/high-availability Note that even if you don't have HA, Kubernetes being a SPOF isn't necessarily critical. Barring some kind of catastropic, cascading fault that affects multiple nodes and requires rescheduling pods to new nodes, a master going down doesn't actually affect what's currently running. Autoscaling and cronjobs won't work, clients using the API will fail, and failed pods won't be replicated, but if the cluster is otherwise fine, pods will just continue running as before. Ny analogy, it's a bit like turning off the engines during spaceflight. You will continue to coast at the same speed, but you can't change course.
- Exuma 9y agoInteresting, well thats great to know. Thanks for the ELI5 explanation.