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

Document minikube image semantics about locations #12270

Open
afbjorklund opened this issue Aug 15, 2021 · 5 comments
Open

Document minikube image semantics about locations #12270

afbjorklund opened this issue Aug 15, 2021 · 5 comments
Labels
area/image Issues/PRs related to the minikube image subcommand kind/documentation Categorizes issue or PR as related to documentation. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@afbjorklund
Copy link
Collaborator

afbjorklund commented Aug 15, 2021

minikube image, an alternative to using minikube docker-env and docker image that supports multiple container runtimes

(originally we added minikube podman-env and podman-remote image, but it didn't scale to other runtimes - like containerd)

Image Command CRI Comment
build No (used to be in CBI) Dockerfile + build context
load No load image from tarball
save No save image to tarball
ls Yes (crictl images)
pull Yes (crictl pull) pull image from remote
push No push image to remote
rm Yes (crictl rmi)
tag No

load

a)
This command loads an image to the minikube cluster

minikube image load image
  1. Load image from docker cache, ~/.minikube/cache/images
  2. Save image from local docker daemon (--daemon), to cache
  3. Pull image from remote docker registry (--remote), to cache

Note: the image will always been copied into the cache directory

b)
Alternatively, load image directly from local tarball file (.tar)

minikube image load image.tar

Note: the image will not be copied into the cache/daemon/remote

pull

Not implemented (separately), see minikube image load --pull.

minikube image pull image

save

a)
This commands saves an image from the minikube cluster

minikube image save image
  1. Save image to docker cache, ~/.minikube/cache/images
  2. Load image to local docker daemon (--daemon), from cache
  3. Push image to remote docker registry (--remote), from cache

Note: the image will always been copied into the cache directory

b)
Alternatively, save image directly to local tarball file (.tar)

minikube image save image.tar

Note: the image will not be copied into the cache/daemon/remote

push

Not implemented (separately), see minikube image build --push.

minikube image push image

In the current implementation, "load" will automatically check with daemon and remote if the image is not found in the cache.
This means that you might have to use --daemon=false --remote=false if you want to avoid this, e.g. no Docker or if offline

In the current implementation, "save" will default to the cache and only upload to daemon and remote if explicitly requested to.
This means that you might have to use --daemon=true --remote=true if you expect this uploading to happen automatically

Note: currently we are using crane to do the downloading.

See https://github.com/google/go-containerregistry

It will use the "tarball" format by default, not "legacy".

This package produces tarballs that can consumed via docker load. Note that this is a different format from the legacy tarballs that are produced by docker save, but this package is still able to read the legacy tarballs produced by docker save.

Currently there is no minikube support for OCI images.

@afbjorklund afbjorklund added the kind/documentation Categorizes issue or PR as related to documentation. label Aug 15, 2021
@afbjorklund
Copy link
Collaborator Author

Note: minikube cache add is the same as minikube image load, but also records the image in the configuration...

This means that the image will be loaded by default, for all new clusters. View the config with minikube cache list

@afbjorklund
Copy link
Collaborator Author

Note: expecting a Docker daemon to always be running locally is legacy behavior, and might be disabled in the future

See: #11059

Note: the cache directory might be replaced by a Distribution server in the future, which would also allow push and pull

See: #12087

@afbjorklund
Copy link
Collaborator Author

afbjorklund commented Aug 15, 2021

Need to implement pull and tag as well, if nothing else then for testing the save command.

PR #12265

Might throw in push for completeness, should be very similar to tag. Maybe it will be useful.

See: #12323

@k8s-triage-robot

This comment was marked as outdated.

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 22, 2021
@k8s-triage-robot

This comment was marked as outdated.

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Dec 22, 2021
@sharifelgamal sharifelgamal added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Jan 12, 2022
@afbjorklund afbjorklund added the area/image Issues/PRs related to the minikube image subcommand label Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/image Issues/PRs related to the minikube image subcommand kind/documentation Categorizes issue or PR as related to documentation. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

No branches or pull requests

5 participants