Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
f49fb20e
Commit
f49fb20e
authored
Apr 27, 2017
by
NickrenREN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add cinder volume examples
I can not find cinder examples,add in packages examples/volume and examples/persistent-volume-provisioning
parent
65838085
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
79 additions
and
0 deletions
+79
-0
cinder-storage-class.yaml
...tent-volume-provisioning/cinder/cinder-storage-class.yaml
+8
-0
example-pod.yaml
...es/persistent-volume-provisioning/cinder/example-pod.yaml
+23
-0
README.md
examples/volumes/cinder/README.md
+27
-0
cinder-web.yaml
examples/volumes/cinder/cinder-web.yaml
+21
-0
No files found.
examples/persistent-volume-provisioning/cinder/cinder-storage-class.yaml
0 → 100644
View file @
f49fb20e
kind
:
StorageClass
apiVersion
:
storage.k8s.io/v1
metadata
:
name
:
gold
provisioner
:
kubernetes.io/cinder
parameters
:
type
:
fast
availability
:
nova
examples/persistent-volume-provisioning/cinder/example-pod.yaml
0 → 100644
View file @
f49fb20e
apiVersion
:
v1
kind
:
ReplicationController
metadata
:
name
:
server
spec
:
replicas
:
1
selector
:
role
:
server
template
:
metadata
:
labels
:
role
:
server
spec
:
containers
:
-
name
:
server
image
:
nginx
volumeMounts
:
-
mountPath
:
/var/lib/www/html
name
:
cinderpvc
volumes
:
-
name
:
cinderpvc
persistentVolumeClaim
:
claimName
:
claim1
examples/volumes/cinder/README.md
0 → 100644
View file @
f49fb20e
This is a simple web server pod which serves HTML from an Cinder volume.
Create a volume in the same tenant and zone as your node.
Add your volume information in the pod description file cinder-web.yaml then create the pod:
```
shell
$
kubectl create
-f
examples/volumes/cinder/cinder-web.yaml
```
Add some data to the volume if is empty:
```
sh
$
echo
"Hello World"
>
& /var/lib/kubelet/plugins/kubernetes.io/cinder/mounts/
{
Volume ID
}
/index.html
```
You should now be able to query your web server:
```
sh
$
curl <Pod IP address>
$
Hello World
```
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[

]()
<!-- END MUNGE: GENERATED_ANALYTICS -->
examples/volumes/cinder/cinder-web.yaml
0 → 100644
View file @
f49fb20e
apiVersion
:
v1
kind
:
Pod
metadata
:
name
:
cinder-web
spec
:
containers
:
-
name
:
web
image
:
nginx
ports
:
-
name
:
web
containerPort
:
80
protocol
:
tcp
volumeMounts
:
-
name
:
html-volume
mountPath
:
"
/usr/share/nginx/html"
volumes
:
-
name
:
html-volume
cinder
:
# Enter the volume ID below
volumeID
:
volume_ID
fsType
:
ext4
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment