Re:MicroK8s – Low-ops, minimal Kubernetes, for cloud, cluste...
by r-bar on Thursday July 22, 2021 @11:12AM
(#27919830)
The best solution I have found for developing locally on k8s is k3d [0]. It quickly deploys k3s clusters inside docker. It comes with a few extras like adding a local docker registry and configuring the cluster(s) to use it. It makes it super easy to setup and tear down clusters.
I usually only reach for it when I am building out a helm charm for a project and want to test it. Otherwise docker-compose is usually enough and is less boilerplate to just get an app and a few supporting resources up and running.
One thing I have been wanting to experiment with more is using something like Tilt [1] for local development. I just have not had an app that required it yet.
[0] https://k3d.io/ [1] https://tilt.dev/
Re:MicroK8s – Low-ops, minimal Kubernetes, for cloud, cluste...
by ra7 on Thursday July 22, 2021 @11:11AM
(#27919814)
The simplest way to bring up a local k8s cluster on your machine for development is to use Kind (https://kind.sigs.k8s.io/).
Re:MicroK8s – Low-ops, minimal Kubernetes, for cloud, cluste...
by phumberdroz on Thursday July 22, 2021 @10:54AM
(#27919607)
The best time I had so far was with dockertest[0] in go it allows you to spin up containers as part of your test suite which then allows you to test against them. So we have one go pkg that has all our containers that we need regularly.
The biggest benefit there is no need to have a docker compose or have other resources running locally you just can run the test cases if you have docker installed. [0] https://github.com/ory/dockertest
Re:MicroK8s – Low-ops, minimal Kubernetes, for cloud, cluste...
by sethammons on Thursday July 22, 2021 @10:16AM
(#27919134)
We deploy with k8s but few of us develop with it. Nearly our whole department uses docker compose to get out dependencies running and to manage our acceptance tests locally. Some people will leverage our staging k8s cluster via kubectl and others just leverage our build pipeline (buildkite + argo cd) that also takes you to stage as it will also take you into production.
Re:MicroK8s – Low-ops, minimal Kubernetes, for cloud, cluste...
by EdwardDiego on Thursday July 22, 2021 @01:14PM
(#27921582)
I use Minikube, I run `eval $(minikube docker-env)` and push my images straight into it - after patching imagePullPolicy to "IfNotPresent" for any resources using snapshot images - as K8s defaults to IfNotPresent, unless the image ends with "snapshot", then it defaults to "Always"...
If developing locally with k8s would likely be a better workflow, are any of these options better than the others for that?