2 changed files with 27 additions and 2 deletions
@ -0,0 +1,18 @@ |
|||
{ |
|||
"apiVersion": "v1", |
|||
"kind": "PersistentVolumeClaim", |
|||
"metadata": { |
|||
"name": "pvc-test" |
|||
"annotations": |
|||
"volume.beta.kubernetes.io/storage-class": "hostpath-provisioner" |
|||
}, |
|||
"spec": { |
|||
"accessModes": [ "ReadWriteOnce" ], |
|||
"resources": { |
|||
"requests": { |
|||
"storage": "5Gi" |
|||
}, |
|||
"volumeName": "pv-test" |
|||
} |
|||
} |
|||
} |
|||
@ -1,7 +1,14 @@ |
|||
oc project default |
|||
oc create -f service-account.yaml |
|||
oc create -f roles.yaml |
|||
# oc adm policy add-scc-to-user hostmount-anyuid system:serviceaccount:test-provisioner:hostpath-provisioner |
|||
# oc adm policy add-cluster-role-to-user hostpath-provisioner-runner system:serviceaccount:test-provisioner:hostpath-provisioner |
|||
oc adm policy add-scc-to-user hostmount-anyuid -z hostpath-provisioner |
|||
oc adm policy add-cluster-role-to-user hostpath-provisioner -z hostpath-provisioner |
|||
|
|||
mkdir /tmp/openshift |
|||
chmod 777 /tmp/openshift |
|||
chcon -Rt svirt_sandbox_file_t /tmp/openshift |
|||
|
|||
oc create -f pod.yaml |
|||
oc create -f class.yaml |
|||
|
|||
oc create -f sample-claim.yaml |
|||
|
|||
Loading…
Reference in new issue