Comments (1)
Validated on master branch with commit d9b8ba8
Environment and config
Ubuntu 22.04, Single server
- Config.yaml
write-kubeconfig-mode: 644
cluster-init: true
node-name: server1
Testing
- Install k3s
- Ensure cluster is up and running
- Deploy pod nginx (Can be from any other image)
- Check nginx is running and image is showed when listed
- Export the image
- Copy the image in to a new server and store it in path
/var/lib/rancher/k3s/agent/images
- Install k3s on the new server
- Ensure the image is shown when listed and no error related to image import is observed in the logs
Replication
$ k3s -v
k3s version v1.30.1+k3s1 (80978b5b)
go version go1.22.2
- Deploy nginx, ensure its on the list
$ kubectl run nginx --image=nginx
pod/nginx created
$ sudo ctr images ls | grep nginx
docker.io/library/nginx:latest
...
- Export that image and copy over to the new server
$ sudo ctr image export nginx-image.tar docker.io/library/nginx:latest
- Install k3s version on the new server
- Copy the image tarball on the new server in path
$ sudo mkdir -p /var/lib/rancher/k3s/agent/images && sudo cp nginx-image.tar /var/lib/rancher/k3s/agent/images
- Observed the error on the logs
$ sudo journalctl -u k3s | grep nginx-image
Jun 12 22:46:49 ip-172-31-47-24 k3s[23292]: time="2024-06-12T22:46:49Z" level=info msg="Importing images from /var/lib/rancher/k3s/agent/images/nginx-image.tar"
Jun 12 22:46:51 ip-172-31-47-24 k3s[23292]: time="2024-06-12T22:46:51Z" level=error msg="Error encountered while importing /var/lib/rancher/k3s/agent/images/nginx-image.tar: failed to import images from /var/lib/rancher/k3s/agent/images/nginx-image.tar: content digest sha256:c36751d7f6324d496c55c7fae626cda3efcc62b11a3b6cfb28d5ae53d8d6fc7a: not found"
- No image is observed when searched on the list
$ sudo ctr images ls | grep nginx
$
Validation
$ k3s -v
k3s version v1.30.1+k3s-d9b8ba8d (d9b8ba8d)
go version go1.22.2
- Deploy nginx, ensure its on the list
$ kubectl run nginx --image=nginx
pod/nginx created
$ sudo ctr images ls | grep nginx
docker.io/library/nginx:latest
...
- Export that image and copy over to the new server
$ sudo ctr image export nginx-image.tar docker.io/library/nginx:latest
- Install k3s commit on the new server
- Copy the image tarball on the new server in path
$ sudo mkdir -p /var/lib/rancher/k3s/agent/images && sudo cp nginx-image.tar /var/lib/rancher/k3s/agent/images
- Observed no related error on the logs
$ sudo journalctl -u k3s | grep nginx-image
Jun 12 22:37:58 k3s[20247]: time="2024-06-12T22:37:58Z" level=info msg="Importing images from /var/lib/rancher/k3s/agent/images/nginx-image.tar"
Jun 12 22:38:00 k3s[20247]: time="2024-06-12T22:38:00Z" level=info msg="Imported images from /var/lib/rancher/k3s/agent/images/nginx-image.tar in 2.262639703s"
- Image is observed when searched on the list
$ sudo ctr images ls | grep nginx
docker.io/library/nginx:latest
...
from k3s.
Related Issues (20)
- How to add multiple parameter values for the --kube-apiserver-arg option in the K3s service. HOT 1
- Flannel Dualstack crash on 1.30.3 HOT 8
- Installation script is failing HOT 1
- Tailscale Auth Keys Expire, Causing Node Disconnection HOT 1
- Broken SQL Connection pooling HOT 1
- Bump stargz-snapshotter to address indirect dependency on `github.com/docker/docker`
- Bump runc to v1.1.14 HOT 1
- logs not found for nodes other than master HOT 4
- k3s second server node join fail with k3s token HOT 1
- [Release-1.31] - Failure to read certificates and key files during k3s certificate rotate-ca HOT 1
- [Release-1.30] - Failure to read certificates and key files during k3s certificate rotate-ca
- [Release-1.29] - Failure to read certificates and key files during k3s certificate rotate-ca
- [Release-1.28] - Failure to read certificates and key files during k3s certificate rotate-ca HOT 1
- [Release-1.31] - Bump runc to v1.1.13
- [Release-1.30] - Bump runc to v1.1.13
- [Release-1.29] - Bump runc to v1.1.14 HOT 1
- [Release-1.28] - Bump runc to v1.1.13
- metrics-server is unable to scrape node when using custom bind-address HOT 1
- [k3s-upgrade] MODIFIED_VERSION is undefined HOT 2
- Document for creating k3s cluster with etcd enabled or upgrading existing k3s to etcd. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from k3s.