Skip to content

Commit 3138560

Browse files
authored
Merge pull request kubernetes#18 from farcaller/fix-rbd-docs
Updated rbd volume example to use yaml configs with better readability
2 parents 599a56f + bd9b7b9 commit 3138560

File tree

5 files changed

+51
-82
lines changed

5 files changed

+51
-82
lines changed

staging/volumes/rbd/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ If you don't have a Ceph cluster, you can set up a [containerized Ceph cluster](
88

99
Then get the keyring from the Ceph cluster and copy it to */etc/ceph/keyring*.
1010

11-
Once you have installed Ceph and new Kubernetes, you can create a pod based on my examples [rbd.json](rbd.json) [rbd-with-secret.json](rbd-with-secret.json). In the pod JSON, you need to provide the following information.
11+
Once you have installed Ceph and new Kubernetes, you can create a pod based on my examples [rbd.yaml](rbd.yaml) [rbd-with-secret.yaml](rbd-with-secret.yaml). In the pod JSON, you need to provide the following information.
1212

1313
- *monitors*: Ceph monitors.
1414
- *pool*: The name of the RADOS pool, if not provided, default *rbd* pool is used.
@@ -39,7 +39,7 @@ An example yaml is provided [here](secret/ceph-secret.yaml). Then post the secre
3939
Here are my commands:
4040

4141
```console
42-
# kubectl create -f examples/volumes/rbd/rbd.json
42+
# kubectl create -f examples/volumes/rbd/rbd.yaml
4343
# kubectl get pods
4444
```
4545

staging/volumes/rbd/rbd-with-secret.json

Lines changed: 0 additions & 41 deletions
This file was deleted.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: rbd2
5+
spec:
6+
containers:
7+
- image: kubernetes/pause
8+
name: rbd-rw
9+
volumeMounts:
10+
- name: rbdpd
11+
mountPath: /mnt/rbd
12+
volumes:
13+
- name: rbdpd
14+
rbd:
15+
monitors:
16+
- '10.16.154.78:6789'
17+
- '10.16.154.82:6789'
18+
- '10.16.154.83:6789'
19+
pool: kube
20+
image: foo
21+
fsType: ext4
22+
readOnly: true
23+
user: admin
24+
secretRef:
25+
name: ceph-secret

staging/volumes/rbd/rbd.json

Lines changed: 0 additions & 39 deletions
This file was deleted.

staging/volumes/rbd/rbd.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: rbd
5+
spec:
6+
containers:
7+
- image: kubernetes/pause
8+
name: rbd-rw
9+
volumeMounts:
10+
- name: rbdpd
11+
mountPath: /mnt/rbd
12+
volumes:
13+
- name: rbdpd
14+
rbd:
15+
monitors:
16+
- '10.16.154.78:6789'
17+
- '10.16.154.82:6789'
18+
- '10.16.154.83:6789'
19+
pool: kube
20+
image: foo
21+
fsType: ext4
22+
readOnly: true
23+
user: admin
24+
keyring: /etc/ceph/keyring

0 commit comments

Comments
 (0)