text stringlengths 0 59.1k |
|---|
``` |
kind: Pod |
apiVersion: v1 |
metadata: |
name: pod-sio-small |
spec: |
containers: |
- name: pod-sio-small-container |
image: registry.k8s.io/test-webserver |
volumeMounts: |
- mountPath: /test |
name: test-data |
volumes: |
- name: test-data |
persistentVolumeClaim: |
claimName: pvc-sio-small |
``` |
Notice that the `claimName:` attribute refers to the name of the PVC, `pvc-sio-small`, defined and deployed earlier. Next, let us deploy the file. |
``` |
$> kubectl create -f examples/volumes/scaleio/pod-sc-pvc.yaml |
``` |
We can now verify that the new pod is deployed OK. |
``` |
kubectl get pod |
NAME READY STATUS RESTARTS AGE |
pod-0 1/1 Running 0 23m |
pod-sio-small 1/1 Running 0 5s |
``` |
<|endoftext|> |
# source: k8s_examples/_archived/volumes/scaleio/secret.yaml type: yaml |
apiVersion: v1 |
kind: Secret |
metadata: |
name: sio-secret |
type: kubernetes.io/scaleio |
data: |
username: YWRtaW4= |
password: c0NhbGVpbzEyMw== |
<|endoftext|> |
# source: k8s_examples/_archived/volumes/scaleio/sc.yaml type: yaml |
kind: StorageClass |
apiVersion: storage.k8s.io/v1 |
metadata: |
name: sio-small |
provisioner: kubernetes.io/scaleio |
parameters: |
gateway: https://localhost:443/api |
system: scaleio |
protectionDomain: pd01 |
storagePool: pd01 |
secretRef: sio-secret |
fsType: xfs |
<|endoftext|> |
# source: k8s_examples/_archived/volumes/nfs/nfs-server-service.yaml type: yaml |
kind: Service |
apiVersion: v1 |
metadata: |
name: nfs-server |
spec: |
ports: |
- name: nfs |
port: 2049 |
- name: mountd |
port: 20048 |
- name: rpcbind |
port: 111 |
selector: |
role: nfs-server |
<|endoftext|> |
# source: k8s_examples/_archived/volumes/nfs/nfs-pvc.yaml type: yaml |
apiVersion: v1 |
kind: PersistentVolumeClaim |
metadata: |
name: nfs |
spec: |
accessModes: |
- ReadWriteMany |
storageClassName: "" |
resources: |
requests: |
storage: 1Mi |
volumeName: nfs |
<|endoftext|> |
# source: k8s_examples/_archived/volumes/nfs/nfs-web-service.yaml type: yaml |
kind: Service |
apiVersion: v1 |
metadata: |
name: nfs-web |
spec: |
ports: |
- port: 80 |
selector: |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.