-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding example for S3 Express use case (#92)
* Adding example for S3 Express use case
- Loading branch information
Showing
4 changed files
with
64 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
examples/kubernetes/static_provisioning/s3_express_specify_az.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolume | ||
metadata: | ||
name: s3-pv | ||
spec: | ||
capacity: | ||
storage: 1200Gi # ignored, required | ||
accessModes: | ||
- ReadWriteMany # supported options: ReadWriteMany / ReadOnlyMany | ||
mountOptions: | ||
- allow-delete | ||
- region us-west-2 | ||
csi: | ||
driver: s3.csi.aws.com # required | ||
volumeHandle: s3-csi-driver-volume | ||
volumeAttributes: | ||
bucketName: s3-csi-driver--usw2-az1--x-s3 | ||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: s3-claim | ||
spec: | ||
accessModes: | ||
- ReadWriteMany # supported options: ReadWriteMany / ReadOnlyMany | ||
storageClassName: "" # required for static provisioning | ||
resources: | ||
requests: | ||
storage: 1200Gi # ignored, required | ||
volumeName: s3-pv | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: s3-app | ||
spec: | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: topology.kubernetes.io/zone | ||
operator: In | ||
values: | ||
- us-west-2a # specify az where bucket lives, note: the code of the availability zone (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html) must be used here (the AZ ID won't work) | ||
containers: | ||
- name: app | ||
image: centos | ||
command: ["/bin/sh"] | ||
args: ["-c", "echo 'Hello from the container!' >> /data/$(date -u).txt; tail -f /dev/null"] | ||
volumeMounts: | ||
- name: persistent-storage | ||
mountPath: /data | ||
volumes: | ||
- name: persistent-storage | ||
persistentVolumeClaim: | ||
claimName: s3-claim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters