[HTML payload içeriği buraya]
25.5 C
Jakarta
Sunday, November 24, 2024

macos – Publishing container pictures to native Docker Desktop from Kaniko operating in kubernetes


I am attempting to noodle out learn how to make this fundamental workflow occur in Docker Desktop for Mac, with Kaniko operating inside a Kubernetes pod:

  1. Pull a base picture from the native Docker context
  2. Construct a picture on high of that with different sources
  3. Publish the brand new picture again to Docker to the native context

with the aim of beginning a brand new pod in Kubernetes that references the picture that was simply constructed, and having Kubernetes launch the pod with that new picture.

We’re already form of doing this in a full-blown Kubernetes cluster the place Kubelet is configured to drag from an exterior registry through an alias of cluster.native so as a substitute of pulling from / publishing to Docker we’re speaking to that registry. The Dockerfile would resemble:

ARG REGISTRY_HOST=exterior.registry.fqdn
FROM ${REGISTRY_HOST}/path/to/my-base-image:1.0.0

COPY ...

RUN ...

...and so on...

and we publish to exterior.registry.fqdn/path/to/my-new-image:2.0.0. However the picture title spec for the pod could be cluster.native/path/to/my-new-image:2.0.0. So in Docker Desktop we would want to have the ability to configure the construct argument REGISTRY_HOST in order that it factors to the Docker Desktop context (I believe).

That is primarily for with the ability to take a look at the method regionally, as a substitute of getting to push helm charts, and so on. as much as a cluster to check adjustments. Any solutions on how one would possibly go about doing one thing like this, maybe with an area registry outdoors of Kubernetes and tweaks to kubelet to have it work like the complete cluster configuration we’re utilizing could be vastly appreciated.

If somebody has managed to do one thing like this utilizing colima and kubernetes, I’ll gladly check out that answer as nicely.

Is there a basis to start this work or has somebody solved this already?

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles