Skip to content

Instantly share code, notes, and snippets.

@douglasrodrigo
Created May 2, 2018 19:07
Show Gist options
  • Save douglasrodrigo/62b0cf8f36c7add9937b4cc8f1f56e3d to your computer and use it in GitHub Desktop.
Save douglasrodrigo/62b0cf8f36c7add9937b4cc8f1f56e3d to your computer and use it in GitHub Desktop.
k8s s3-import
apiVersion: batch/v1
kind: Job
metadata:
name: aws-s3-import
spec:
backoffLimit: 4
template:
spec:
containers:
- name: aws-cli
image: mesosphere/aws-cli
command:
- /bin/sh
- -c
- "aws s3 sync s3://origin s3://target"
env:
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: aws-kops-credentials
key: aws_access_key_id
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: aws-kops-credentials
key: aws_secret_access_key
- name: AWS_DEFAULT_REGION
valueFrom:
secretKeyRef:
name: aws-kops-credentials
key: aws_default_region
restartPolicy: Never
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment