question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reset k8s feature remove all non-rancher images

See original GitHub issue

Summary

What happened/what you expected to happen?

Issue found

  • Resetting k8s through RD settings will remove all non-rancher pulled images from the system.

Expected behaviour

  • Reset Kubernetes through RD should keep non-rancher images.

What version of Rancher Desktop are you running?

  • V0.5.0

What version of Kubernetes are you running?

  • v1.21.5

Which OS version?

  • macOS 11.6 (20G165) - BigSur / Darwin 20.6.0

How to replicate

  • Pull sample images using RD Pull Image feature or
  • Pull sample images with nerdctl pull apline:latest or
  • Pull sample images with kim pull node:lts
  • Pulling images with kim, you should be able to see the pulled images on RD image list
  • Navigate to K8s Settings and click: Reset Kubernetes -> OK
  • Wait until k8s being reset
  • Verify if pulled images still visible
    • kim images -a
    • On RD, navigate to Images and check the images

Screen Shot 2021-09-28 at 2 21 46 PM

Diagnostics

Resetting k8s through RD UI seems to delete all images non-rancher instead just reset the k8s without removing the non-rancher images.

Before k8s reset Note: manually pulled ubuntu, alpine and ngnix using kim

kim list -a

❯ kim images -a
IMAGE                            TAG                    IMAGE ID            SIZE
ubuntu                           latest                 fb52e22af1b01       28.6MB <-- manually pulled
rancher/local-path-provisioner   v0.0.19                148c192562719       42.6MB
rancher/library-busybox          1.32.1                 388056c9a6838       1.45MB
rancher/coredns-coredns          1.8.3                  3885a5b7f138c       43.6MB
rancher/klipper-lb               v0.2.0                 465db341a9e5b       6.46MB
rancher/metrics-server           v0.3.6                 9dd718864ce61       41.2MB
alpine                           latest                 14119a10abf46       2.82MB <-- manually pulled
rancher/pause                    3.1                    da86e6ba6ca19       746kB
rancher/library-traefik          2.4.8                  deaf4b1027ed4       92.7MB
rancher/klipper-helm             v0.6.4-build20210813   f0b5a8f3a50a8       195MB
nginx                            latest                 f8f4ffc8092c9       53.8MB <-- manually pulled
moby/buildkit                    v0.8.3                 cf14c5e88c0eb       56.5MB
rancher/kim                      v0.1.0-beta.6          fef914df5da89       13.8MB

After k8s reset Note: all non-rancher images were deleted.

IMAGE                            TAG                    IMAGE ID            SIZE
rancher/local-path-provisioner   v0.0.19                148c192562719       42.6MB
rancher/library-busybox          1.32.1                 388056c9a6838       1.45MB
rancher/coredns-coredns          1.8.3                  3885a5b7f138c       43.6MB
rancher/klipper-lb               v0.2.0                 465db341a9e5b       6.46MB
rancher/metrics-server           v0.3.6                 9dd718864ce61       41.2MB
rancher/pause                    3.1                    da86e6ba6ca19       746kB
rancher/library-traefik          2.4.8                  deaf4b1027ed4       92.7MB
rancher/klipper-helm             v0.6.4-build20210813   f0b5a8f3a50a8       195MB
moby/buildkit                    v0.8.3                 cf14c5e88c0eb       56.5MB
rancher/kim                      v0.1.0-beta.6          fef914df5da89       13.8MB

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ericpromislowcommented, Oct 7, 2021

Everyton, I ran into the mount error in windows as well. Could you write that up in a separate issue? Basically, reset k8a and switching versions don’t work on Windows right now. I’m exploring this in more detail right now.

1reaction
mattfarinacommented, Sep 28, 2021

I’ve reproduced this with nerdctl.

before reset:

❯ nerdctl images
WARN[0000] unparsable image name "overlayfs@sha256:6c3699c1cebe59a57f193007cafc6dd21a3288b42b7a3616c09727804f091917"
REPOSITORY    TAG       IMAGE ID        CREATED        SIZE
demo          latest    6c3699c1cebe    3 hours ago    5.9 MiB
nginx         latest    969419c0b7b0    3 hours ago    139.8 MiB
                        6c3699c1cebe    3 hours ago    5.9 MiB

After reset of just Kubernetes…

❯ nerdctl images
REPOSITORY    TAG    IMAGE ID    CREATED    SIZE
Read more comments on GitHub >

github_iconTop Results From Across the Web

kubeadm reset - Kubernetes
kubeadm reset is responsible for cleaning up a node local file system from files that were created using the kubeadm init or kubeadm...
Read more >
[kubeadm reset] Failed to clear cluster data #2712 - GitHub
I created a k8s cluster using kubeadm(This cluster has three control plane nodes and three worker nodes), and then I reset the cluster...
Read more >
Features | Rancher Desktop Docs
This feature uses Trivy to scan your images for vulnerabilities and configuration issues. ... Reset Kubernetes and remove all workloads and configurations.
Read more >
Resetting and restarting your cluster - Kubernetes for ... - O'Reilly
Resetting and restarting your cluster If you want to wipe out your local Minikube cluster and restart, it is very easy to do...
Read more >
How to completely uninstall kubernetes - Stack Overflow
In my "Ubuntu 16.04", I use next steps to completely remove and clean Kubernetes (installed with "apt-get"): kubeadm reset sudo apt-get ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found