-
-
Save tsunejui/30be9d508f757607fab510d120e0a6d8 to your computer and use it in GitHub Desktop.
PVC and Pod for testing an NFS Auto Provisioner Storage Class
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
# Apply this file | |
# Get a bash prompt in the container with: kubectl exec -it pod/ubuntu-test-nfs -- /bin/bash | |
# Navigate to /nfs directory | |
# Create some files and confirm everything is as expected on the NFS Server | |
# | |
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: test-nfs-provisioner | |
namespace: default | |
spec: | |
storageClassName: managed-nfs-storage | |
accessModes: | |
- ReadWriteMany | |
resources: | |
requests: | |
storage: 10Mi | |
--- | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
labels: | |
run: ubuntu | |
name: ubuntu-test-nfs | |
namespace: default | |
spec: | |
containers: | |
- image: ubuntu | |
name: ubuntu | |
resources: {} | |
command: ["sleep", "3600"] | |
volumeMounts: | |
- mountPath: /nfs | |
name: nfs-vol | |
volumes: | |
- name: nfs-vol | |
persistentVolumeClaim: | |
claimName: test-nfs-provisioner |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment