-
-
Save hemanth22/24fa587ff4a07799a6a5c75332e45f1e 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