Backup a Consul cluster used as Vault storage backend and running on Kubernetes
Edit k8s-cronjob.yaml as needed and then run:
kubectl apply -f k8s-cronjob.yaml
Update env.list accordingly and run:
make backup
Update env.list accordingly and run:
make restore
KUBE_SA_TOKEN: JWT generated by the Kubernetes cluster for 'my' service accountVAULT_ADDR: Vault URL, i.e. https://vault.domainVAULT_LOGIN_ROLE: Vault role that I can use to loginVAULT_AWS_AUTH_PATH: Vault path that I can use to get my AWS keysAWS_IAM_POLICY: AWS IAM policy name that allows me to put/get backups to S3 bucketKUBERNETES_AUTH_PATH: Vault path to use for Kubernetes auth backendINFLUXDB_URL: InfluxDB URL, i.e. https://influx.domain/write?db=backups so we can send events to it
CONSUL_HTTP_ADDR: Consul URL, i.e. https://consul.domainS3_BUCKET: S3 bucket name for storing backups
REMOTE_FILE_PATH: 2018/02/16/consul-backup-11-03-17.snapCONSUL_BOOTSTRAP_TOKEN: what it says on the tin; generated during a new Consul cluster setupACCESS_KEY: AWS access keySECRET_KEY: AWS secret key