Skip to content

Instantly share code, notes, and snippets.

@yifan-gu
Created June 8, 2017 01:55
Show Gist options
  • Save yifan-gu/5516e565f80b12eef1704f8a2b58ab04 to your computer and use it in GitHub Desktop.
Save yifan-gu/5516e565f80b12eef1704f8a2b58ab04 to your computer and use it in GitHub Desktop.
etcd backup manifests
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: etcd-operator-test
namespace: kube-system
spec:
replicas: 1
template:
metadata:
labels:
name: etcd-operator
spec:
containers:
- name: etcd-operator
image: quay.io/coreos/etcd-operator:v0.3.2
command:
- /usr/local/bin/etcd-operator
- --backup-aws-secret=aws # assuming the configmap and secret are both named 'aws'
- --backup-aws-config=aws
- --backup-s3-bucket=tectonic-backup-test # replace the name of the S3 bucket that will store the backups
env:
- name: MY_POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: MY_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
apiVersion: "etcd.coreos.com/v1beta1"
kind: "Cluster"
metadata:
name: "example-etcd-cluster-with-backup"
spec:
size: 3
version: "3.1.8"
backup:
# short snapshot interval for testing, do not use this in production!
storageType: "S3"
backupIntervalInSecond: 30
maxBackups: 5
s3:
s3Bucket: tectonic-backup-test
awsSecret: aws
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment