4 ms·
I used this to get an idea how K8s looked when I wanted to migrate ~500 lines of docker compose YAML config to k8s. The result was sufficiently confusing that
by codebeaker 10y ago
I used this to get an idea how K8s looked when I wanted to migrate ~500 lines of docker compose YAML config to k8s.
The result was sufficiently confusing that we threw it away, but it was helpful to get an idea what we were looking at, and why. We rebuilt the stack from hand, using all the files from the kompose tool as a guide/reference.
Later we found that kubectl can dump yaml, I found `kubectl .... -o=yaml[ ...]` to be super helpful, for any command you run from the tutorial or elsewhere, it'll generate you the equivalent YAML which you can commit/apply at your leisure.
I'm glad the tool existed, but idiomatic stuff in docker-compose is unidomatic in k8s (namely secret handling is completely different) which is a hurdle, and the "links" concept as used in docker-compose is essentially absent from k8s for our purposes (and, replaced wth much, much better and granular dns services and "expose"s)
- theptip 10y agoYou can also add the `--export` flag to get kubectl to omit unique metadata that would be ignored on import; keeps your exported files a bit tidier.
- ricw 10y agoVery interesting, as we're looking into doing essentially exactly the same very soon. seems even more urgent with docker just having announced free/enterprise editions. Would be very interested in a blog post / some more detail about how it went down! more generally, what were the biggest upsides / downsides from moving to k8s?!
- tln 10y agoDocker always had free and enterprise versions, they've just rebranded them.
- lloeki 10y agoLinks are supposed to be legacy and docker seems to push people into using docker networks, but pragmatically there's something nice about links that make it really fit and simple for many simple use cases where full-blown networks and service discovery are just way overkill.
- notjack 10y agoIf you don't use networks then all services are on the default network and can refer to each other by service name, so even without complicated full-blown networks links are superfluous.