Skaffold: Add support for k3d

Created on 29 Aug 2019  路  4Comments  路  Source: GoogleContainerTools/skaffold

Use case

Im trying to leverage k3d for efficient local k8s development. k3d requires an extra command to import the build images into the k3d containerd file-system (k3d import-images $images) so I need to use the custom build spec - but just on the local profile. The number of artifacts is quite large so it is unfeasible to patch every single one by itself. What would be the best approach here?

Actual behavior

Having n artifacts requires n patches inside each profile as the build specifics are set on an artifact level. Its not possible to "patch all artifacts at the same time" with json-patch (?) or apply the build spec to a level above the artifacts for inheritance.

Expected behavior

Adding a custom: build spec to a profile should make all artifacts use said build spec.
Alternative: support local k3d cluster natively

build:
  artifacts:
    - image: app-one
      context: app/one
    - image: app-two
      context: app/two
    - image: app-three
      context: app/three

...

profiles:
  - name: local
    activation:
      - env: ENV=local
    build:
      custom: 
         # expected, but not possible
         buildCommand: ./build.sh
  - name: production
    activation:
      - env: ENV=prod
    ...

arebuild aredeploy kinfeature-request platfork3d prioritawaiting-more-evidence

Most helpful comment

for me, k3d is blazingly fast than kind, lightweight

All 4 comments

Thanks for opening the issue!
The bulk artifact type change doesn't sound like something we would support, not sure if there is a good generic way to do that.
To add k3d as a target platform - we could be convinced but we would need more evidence that a lot of users would benefit from it. Also, I am not sure what k3d provides beyond kind that works seemingly similarly (docker based lightweight k8s cluster with image loading ..) and we do support kind out of the box: https://github.com/kubernetes-sigs/kind.

for me, k3d is blazingly fast than kind, lightweight

Leaving this one open, but AFAIK, no one is currently working on this. PR's welcome!

From a WSL2 perspective, would be very interested in this given minikube effectively doesn't work but k3d does.

Was this page helpful?
0 / 5 - 0 ratings