apiVersion: v1
kind: Secret
metadata:
name: s3
namespace: digdag-jobs
type: Opaque
stringData:
id: ******************
secret: ************************************
---
apiVersion: v1
kind: Pod
metadata:
name: example
namespace: digdag-jobs
spec:
restartPolicy: Never
imagePullSecrets:
- name: dockercfg
volumes:
- name: s3-mount
emptyDir: {}
containers:
- name: nginx-container
image: nginx
volumeMounts:
- mountPath: /data:slave
name: s3-mount
mountPropagation: Bidirectional
- name: goofys
env:
- name: MOUNT_DIR
value: /vortex-artifacts
- name: BUCKET
value: eg-example-data
- name: REGION
value: us-west-2
- name: DIR_MODE
value: "0777"
- name: FILE_MODE
value: "0777"
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: s3
key: id
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: s3
key: secret
image: cloudposse/goofys
imagePullPolicy: Always
resources: {}
securityContext:
privileged: true
runAsUser: 0
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data:shared
name: s3-mount
mountPropagation: Bidirectional
https://kubernetes.io/ko/docs/concepts/storage/persistent-volumes/
https://icicimov.github.io/blog/virtualization/Kubernetes-shared-storage-with-S3-backend/
** StatefulSet을 이용한 상태유지 Pod Volume 관리하기
https://www.ibm.com/support/knowledgecenter/ko/SSBS6K_3.1.0/manage_images/imagepullsecret.html
https://github.com/cloudposse/goofys
'BigData' 카테고리의 다른 글
create DB in postgres 및 size check (0) | 2020.06.01 |
---|---|
k8s API LIST RETRIEVE (0) | 2020.05.29 |
K8S 클러스터 내부 DNS 주소를 확인 (0) | 2020.05.28 |
Kubernetes jobs (0) | 2020.05.27 |
Apache Atlas to Airflow (0) | 2020.05.25 |