Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow image push to lima kubernetes cluster #4487

Merged
merged 2 commits into from Dec 26, 2023

Conversation

afbjorklund
Copy link
Contributor

@afbjorklund afbjorklund commented Oct 24, 2023

What does this PR do?

Screenshot/screencast of this PR

What issues does this PR fix or reference?

Closes #4486

How to test this PR?

This assumes that the cluster is using containerd...

If running cri-o, it would have to use podman load instead:

sudo nerdctl -n k8s.io load -i => sudo podman load -i

But it is hardcoded the same way, in kind load image-archive

@afbjorklund
Copy link
Contributor Author

afbjorklund commented Oct 31, 2023

A future addition should make it possible to configure the command being used to load images...

Currently it uses a hardcoded ctr -n=k8s.io images import

But if it is possible to install a different container runtime and container engine, that could change:


  • Default:
    • Socket: "" (no Docker API)
    • Command: "" (see above)
  • Nerdctl: (for cri-containerd)
    • Socket: nerdctl.sock
    • Command: nerdctl
  • Docker: (for cri-dockerd)
    • Socket: docker.sock
    • Command: docker
  • Podman: (for cri-o)
    • Socket: podman.sock
    • Command: podman

i.e. sudo $command load -i

Copy link
Contributor

@cdrage cdrage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late reply, but this works great! Took me a while to setup the cluster, so it took some time.

Thank you so much for the contribution. I was able to successfully push an image to the k8s cluster.

@benoitf
Copy link
Collaborator

benoitf commented Dec 22, 2023

looks like there is a conflict in the file

@afbjorklund
Copy link
Contributor Author

afbjorklund commented Dec 22, 2023

looks like there is a conflict in the file

Merge conflicts, because javascript is silly

     "adm-zip": "^0.5.10",
-    "mkdirp": "^3.0.1",
-    "vite": "^5.0.10",
-    "vitest": "^1.1.0"
+    "mkdirp": "^3.0.1"
   }
@@@ -50,7 -64,6 +64,8 @@@
    "devDependencies": {
      "adm-zip": "^0.5.10",
      "mkdirp": "^3.0.1",
 +    "vite": "^5.0.10",
-     "vitest": "^1.1.0"
++    "vitest": "^1.1.0",
+     "tmp-promise": "^3.0.3"
    }
  }

Due to not allowing trailing commas in lists.

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
@benoitf benoitf merged commit d2d51c2 into containers:main Dec 26, 2023
8 checks passed
@podman-desktop-bot podman-desktop-bot added this to the 1.7.0 milestone Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow pushing images to the containerd in the Lima k3s/k8s cluster
4 participants