3 ms·
Is developing locally with one of these k8s implementations a good option? My current workflow is to develop locally with a combination of bare (non-containeriz
by arcticfox 5y ago
Is developing locally with one of these k8s implementations a good option? My current workflow is to develop locally with a combination of bare (non-containerized) servers and Docker containers, but all of my deployment is to a hosted k8s cluster.
If developing locally with k8s would likely be a better workflow, are any of these options better than the others for that?
- sethammons 5y agoWe 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.
- phumberdroz 5y agoThe 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 https://github.com/ory/dockertest
- ra7 5y agoThe simplest way to bring up a local k8s cluster on your machine for development is to use Kind (https://kind.sigs.k8s.io/ https://kind.sigs.k8s.io/).
- r-bar 5y agoThe 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/ https://k3d.io/ [1] https://tilt.dev/ https://tilt.dev/
- EdwardDiego 5y agoI 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"...