Created
March 8, 2017 22:49
-
-
Save gnufied/ace932d6fa9e20fb0b90053ea6a078b7 to your computer and use it in GitHub Desktop.
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
1. While creating pv with host path: | |
ubuntu@ip-172-18-6-23:~/configs$ kubectl create -f pv_4.yaml | |
The PersistentVolume "recyle-pv4" is invalid: metadata.annotations.volume.beta.kubernetes.io/mount-options: Forbidden: may not specify mount options for this volume type | |
2. While creating a AWS EBS pv: | |
ubuntu@ip-172-18-6-23:~/configs$ cat pv_mo.yaml | |
apiVersion: "v1" | |
kind: "PersistentVolume" | |
metadata: | |
name: hekumar-discard | |
annotations: | |
volume.beta.kubernetes.io/mount-options: "discard" | |
spec: | |
capacity: | |
storage: "10Gi" | |
accessModes: | |
- "ReadWriteOnce" | |
awsElasticBlockStore: | |
fsType: "ext4" | |
volumeID: "vol-f37a03aa" | |
It worked. | |
3. Updating a PV with unsupported mount options: | |
ubuntu@ip-172-18-6-23:~/configs$ kubectl replace -f pv_4.yaml | |
The PersistentVolume "recyle-pv4" is invalid: metadata.annotations.volume.beta.kubernetes.io/mount-options: Forbidden: may not specify mount options for this volume type | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment