[Documentation] Clarification about using locally built images
See original GitHub issueFor feature requests, describe what you’d like to add or change
At the present time it’s not clear how to use locally built images (by nerdctl build
) in k8s manifests.
There is a phrase on main RD site The container images you build can be run by Kubernetes immediately without the need for a registry
and no more info about that
To Reproduce
- build image
nerdctl build -t local/my-app:latest .
- Deploy simple manifest:
by command:apiVersion: apps/v1 kind: Deployment metadata: name: my-app-deployment labels: app: my-app spec: replicas: 1 selector: matchLabels: app: my-app template: metadata: labels: app: my-app spec: containers: - name: my-app image: local/my-app:latest
kubectl apply -f my-app.yaml
- Get events
See error something like this:kubectl get events
Failed to pull image "local/my-app:latest": rpc error: code = Unknown desc = failed to pull and unpack image "docker.io/local /my-app:latest": failed to resolve reference "docker.io/local/my-app:latest": pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
Setup (please complete the following information):
- OS: MacOS Monterey
- Rancher Desktop version: 0.6.1
- Kubernetes version: 1.21.6
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:6
Top Results From Across the Web
Best practices for writing Dockerfiles - Docker Documentation
Best practices for writing Dockerfiles. This document covers recommended best practices and methods for building efficient images. Docker builds images ...
Read more >How to use a local registry - MicroK8s
The following documentation explains how to use MicroK8s with local images, or images fetched from public or private registries. A familiarity with building, ......
Read more >Build Images with Docker | DevSpace | Documentation
Explanation : The first image backend would be preferably built with Minikube's Docker daemon and the image would not be pushed to a...
Read more >Pushing and pulling images | Container Registry documentation
To push any local image to Container Registry using Docker or another third-party tool, you need to first tag it with the registry...
Read more >How to customize Docker images - Amazon EMR
Create a new Dockerfile on your local Workspace. Edit the Dockerfile you just created and add the following content. This Dockerfile uses the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In addition to creating the image in the
k8s.io
namespace you should also set theimagePullPolicy
toNever