Skip to content

Commit

Permalink
edited cert name for compatibility with oc
Browse files Browse the repository at this point in the history
  • Loading branch information
Xelef2000 committed Oct 23, 2023
1 parent 94d7345 commit c00c478
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ If you run etcd outside of your cluster, you can get the information from the et
Get the certificates from the kubernetes host and put them into a secret:
```
kubectl create secret generic etcd-peer-tls --from-file=tls.crt --from-file=tls.key -n etcd-backup
kubectl create secret generic etcd-server-ca --from-file=ca.crt -n etcd-backup
kubectl create secret generic etcd-server-ca --from-file=service-ca.crt -n etcd-backup
```
Add the endpoint IP address to the config map, without `https://` or port:
```
Expand Down
2 changes: 1 addition & 1 deletion backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ mkdir -p "/host/var/tmp/etcd-backup"
mkdir -p "${BACKUP_PATH_POD}"

# create backup to temporary location
ETCDCTL_API=3 etcdctl --endpoints ${ENDPOINT}:2379 --cacert='/etc/kubernetes/pki/etcd-ca/ca.crt' --cert='/etc/kubernetes/pki/etcd-peer/tls.crt' --key='/etc/kubernetes/pki/etcd-peer/tls.key' snapshot save /host/var/tmp/etcd-backup/snapshot.db
ETCDCTL_API=3 etcdctl --endpoints ${ENDPOINT}:2379 --cacert='/etc/kubernetes/pki/etcd-ca/service-ca.crt' --cert='/etc/kubernetes/pki/etcd-peer/tls.crt' --key='/etc/kubernetes/pki/etcd-peer/tls.key' snapshot save /host/var/tmp/etcd-backup/snapshot.db
ETCDCTL_API=3 etcdctl --write-out=table snapshot status /host/var/tmp/etcd-backup/snapshot.db

# move files to pvc and delete temporary files
Expand Down

0 comments on commit c00c478

Please sign in to comment.