Created
January 24, 2022 10:58
-
-
Save rafzei/31fb9af0c90ede46a8676e90c9d258b3 to your computer and use it in GitHub Desktop.
ctr commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List images in k8s | |
ctr --namespace k8s.io image list | |
# Create etcd snapshot | |
ctr --namespace k8s.io \ | |
run \ | |
--mount type=bind,src={{ backup_temp_dir.path }}/,dst=/backup/,options=rbind:rw \ | |
--net-host \ | |
--env ETCDCTL_API=3 \ | |
--rm "{{ etcd_image_name.stdout | trim }}" \ | |
etcd \ | |
etcdctl \ | |
--endpoints https://127.0.0.1:2379 \ | |
--cacert /backup/pki/etcd/ca.crt \ | |
--cert /backup/pki/etcd/healthcheck-client.crt \ | |
--key /backup/pki/etcd/healthcheck-client.key \ | |
snapshot save /backup/etcd-snapshot.db |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
crictl commands: https://gist.github.com/rafzei/69149606d0f5a49b39ace96c6d540f4e