清理k3s的镜像缓存

You can tune these thresholds on your k3s nodes by adding arguments to the service command line:
--kubelet-arg=image-gc-high-threshold=85 --kubelet-arg=image-gc-low-threshold=80

If for some reason you want to muck about with deleting things manually, you can try:
sudo k3s crictl images to see what images have been pulled locally
sudo k3s crictl rmi --prune to delete any images no currently used by a running container

替换tls

kubectl create secret tls my-domain-tls --namespace=default --key=./tls.key --cert=./tls.crt --dry-run -o yaml | kubectl apply -f -

清理docker仓库

docker exec registry bin/registry garbage-collect --dry-run /etc/docker/registry/config.yml

sh
rm -r <root>/v2/repositories/${name}/_manifests/tags/${tag}/index/sha256/${hash}
rm -r <root>/v2/repositories/${name}/_manifests/revisions/sha256/${hash}

docker exec **registry** bin/registry garbage-collect --dry-run /etc/docker/registry/config.yml