2015-07-14 00:13:09 +00:00
|
|
|
<!-- BEGIN MUNGE: UNVERSIONED_WARNING -->
|
|
|
|
|
|
|
|
<!-- BEGIN STRIP_FOR_RELEASE -->
|
|
|
|
|
2015-07-16 17:02:26 +00:00
|
|
|
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
|
|
|
|
width="25" height="25">
|
|
|
|
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
|
|
|
|
width="25" height="25">
|
|
|
|
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
|
|
|
|
width="25" height="25">
|
|
|
|
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
|
|
|
|
width="25" height="25">
|
|
|
|
<img src="http://kubernetes.io/img/warning.png" alt="WARNING"
|
|
|
|
width="25" height="25">
|
|
|
|
|
|
|
|
<h2>PLEASE NOTE: This document applies to the HEAD of the source tree</h2>
|
|
|
|
|
|
|
|
If you are using a released version of Kubernetes, you should
|
|
|
|
refer to the docs that go with that version.
|
|
|
|
|
|
|
|
<strong>
|
|
|
|
The latest 1.0.x release of this document can be found
|
|
|
|
[here](http://releases.k8s.io/release-1.0/examples/aws_ebs/README.md).
|
|
|
|
|
|
|
|
Documentation for other releases can be found at
|
|
|
|
[releases.k8s.io](http://releases.k8s.io).
|
|
|
|
</strong>
|
|
|
|
--
|
2015-07-13 22:15:35 +00:00
|
|
|
|
2015-07-14 00:13:09 +00:00
|
|
|
<!-- END STRIP_FOR_RELEASE -->
|
|
|
|
|
|
|
|
<!-- END MUNGE: UNVERSIONED_WARNING -->
|
2015-06-11 14:36:13 +00:00
|
|
|
This is a simple web server pod which serves HTML from an AWS EBS
|
|
|
|
volume.
|
|
|
|
|
|
|
|
Create a volume in the same region as your node add your volume
|
|
|
|
information in the pod description file aws-ebs-web.yaml then create
|
|
|
|
the pod:
|
2015-07-17 02:01:02 +00:00
|
|
|
|
2015-07-20 04:38:53 +00:00
|
|
|
```sh
|
2015-07-16 00:20:39 +00:00
|
|
|
$ kubectl create -f examples/aws_ebs/aws-ebs-web.yaml
|
2015-06-11 14:36:13 +00:00
|
|
|
```
|
2015-07-17 02:01:02 +00:00
|
|
|
|
2015-06-11 14:36:13 +00:00
|
|
|
Add some data to the volume if is empty:
|
2015-07-17 02:01:02 +00:00
|
|
|
|
2015-07-20 04:38:53 +00:00
|
|
|
```sh
|
2015-06-11 14:36:13 +00:00
|
|
|
$ echo "Hello World" >& /var/lib/kubelet/plugins/kubernetes.io/aws-ebs/mounts/aws/{Region}/{Volume ID}/index.html
|
|
|
|
```
|
2015-07-17 02:01:02 +00:00
|
|
|
|
2015-06-11 14:36:13 +00:00
|
|
|
You should now be able to query your web server:
|
2015-07-17 02:01:02 +00:00
|
|
|
|
2015-07-20 04:38:53 +00:00
|
|
|
```sh
|
2015-06-11 14:36:13 +00:00
|
|
|
$ curl <Pod IP address>
|
|
|
|
$ Hello World
|
2015-07-18 03:56:47 +00:00
|
|
|
```
|
2015-06-11 14:36:13 +00:00
|
|
|
|
2015-07-14 00:13:09 +00:00
|
|
|
|
|
|
|
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
|
2015-06-11 14:36:13 +00:00
|
|
|
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/examples/aws_ebs/README.md?pixel)]()
|
2015-07-14 00:13:09 +00:00
|
|
|
<!-- END MUNGE: GENERATED_ANALYTICS -->
|