Proof of concept for import script; various FARs
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
---
|
||||
title: "Containers with Kubernetes"
|
||||
---
|
||||
{% include pagetoc.html %}
|
||||
|
||||
## Containers and commands
|
||||
|
||||
So far the Pods we've seen have all used the `image` field to indicate what process Kubernetes
|
||||
|
||||
@@ -69,9 +69,4 @@ drwxrwxrwt 3 0 0 180 Aug 24 13:03 ..
|
||||
|
||||
{% endhighlight %}
|
||||
|
||||
The file `labels` is stored in a temporary directory (`..2015_08_24_13_03_44259413923` in the example above) which is symlinked to by `..downwardapi`. Symlinks for annotations and labels in `/etc` point to files containing the actual metadata through the `..downwardapi` indirection. This structure allows for dynamic atomic refresh of the metadata: updates are written to a new temporary directory, and the `..downwardapi` symlink is updated atomically using `rename(2)`.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
The file `labels` is stored in a temporary directory (`..2015_08_24_13_03_44259413923` in the example above) which is symlinked to by `..downwardapi`. Symlinks for annotations and labels in `/etc` point to files containing the actual metadata through the `..downwardapi` indirection. This structure allows for dynamic atomic refresh of the metadata: updates are written to a new temporary directory, and the `..downwardapi` symlink is updated atomically using `rename(2)`.
|
||||
@@ -69,9 +69,4 @@ drwxrwxrwt 3 0 0 180 Aug 24 13:03 ..
|
||||
|
||||
{% endhighlight %}
|
||||
|
||||
The file `labels` is stored in a temporary directory (`..2015_08_24_13_03_44259413923` in the example above) which is symlinked to by `..downwardapi`. Symlinks for annotations and labels in `/etc` point to files containing the actual metadata through the `..downwardapi` indirection. This structure allows for dynamic atomic refresh of the metadata: updates are written to a new temporary directory, and the `..downwardapi` symlink is updated atomically using `rename(2)`.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
The file `labels` is stored in a temporary directory (`..2015_08_24_13_03_44259413923` in the example above) which is symlinked to by `..downwardapi`. Symlinks for annotations and labels in `/etc` point to files containing the actual metadata through the `..downwardapi` indirection. This structure allows for dynamic atomic refresh of the metadata: updates are written to a new temporary directory, and the `..downwardapi` symlink is updated atomically using `rename(2)`.
|
||||
@@ -1,9 +1,6 @@
|
||||
---
|
||||
title: "Environment Guide Example"
|
||||
---
|
||||
|
||||
Environment Guide Example
|
||||
=========================
|
||||
This example demonstrates running pods, replication controllers, and
|
||||
services. It shows two types of pods: frontend and backend, with
|
||||
services on top of both. Accessing the frontend pod will return
|
||||
@@ -15,29 +12,28 @@ is [here](/{{page.version}}/docs/user-guide/container-environment).
|
||||
|
||||

|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
## Prerequisites
|
||||
|
||||
This example assumes that you have a Kubernetes cluster installed and
|
||||
running, and that you have installed the `kubectl` command line tool
|
||||
somewhere in your path. Please see the [getting
|
||||
started](/{{page.version}}/docs/getting-started-guides/) for installation instructions
|
||||
for your platform.
|
||||
|
||||
Optional: Build your own containers
|
||||
-----------------------------------
|
||||
### Optional: Build your own containers
|
||||
|
||||
The code for the containers is under
|
||||
[containers/](containers/)
|
||||
|
||||
Get everything running
|
||||
----------------------
|
||||
## Get everything running
|
||||
|
||||
kubectl create -f ./backend-rc.yaml
|
||||
kubectl create -f ./backend-srv.yaml
|
||||
kubectl create -f ./show-rc.yaml
|
||||
kubectl create -f ./show-srv.yaml
|
||||
|
||||
Query the service
|
||||
-----------------
|
||||
## Query the service
|
||||
|
||||
Use `kubectl describe service show-srv` to determine the public IP of
|
||||
your service.
|
||||
|
||||
@@ -48,7 +44,8 @@ your service.
|
||||
Run `curl <public ip>:80` to query the service. You should get
|
||||
something like this back:
|
||||
|
||||
```
|
||||
```
|
||||
|
||||
Pod Name: show-rc-xxu6i
|
||||
Pod Namespace: default
|
||||
USER_VAR: important information
|
||||
@@ -67,7 +64,8 @@ Found backend ip: 10.147.252.185 port: 5000
|
||||
Response from backend
|
||||
Backend Container
|
||||
Backend Pod Name: backend-rc-6qiya
|
||||
Backend Pod Name: backend-rc-6qiya
|
||||
Backend Namespace: default
|
||||
|
||||
```
|
||||
|
||||
First the frontend pod's information is printed. The pod name and
|
||||
@@ -87,10 +85,7 @@ frontend pods are always contacting the backend through the backend
|
||||
service. This results in a different backend pod servicing each
|
||||
request as well.
|
||||
|
||||
request as well.
|
||||
|
||||
## Cleanup
|
||||
|
||||
kubectl delete rc,service -l type=show-type
|
||||
-------
|
||||
kubectl delete rc,service -l type=show-type
|
||||
kubectl delete rc,service -l type=backend-type
|
||||
|
||||
kubectl delete rc,service -l type=backend-type
|
||||
@@ -1,25 +1,22 @@
|
||||
---
|
||||
title: "Building"
|
||||
---
|
||||
|
||||
Building
|
||||
--------
|
||||
For each container, the build steps are the same. The examples below
|
||||
are for the `show` container. Replace `show` with `backend` for the
|
||||
backend container.
|
||||
|
||||
Google Container Registry ([GCR](https://cloud.google.com/tools/container-registry/))
|
||||
---
|
||||
## Google Container Registry ([GCR](https://cloud.google.com/tools/container-registry/))
|
||||
|
||||
docker build -t gcr.io/<project-name>/show .
|
||||
gcloud docker push gcr.io/<project-name>/show
|
||||
|
||||
Docker Hub
|
||||
----------
|
||||
## Docker Hub
|
||||
|
||||
docker build -t <username>/show .
|
||||
docker push <username>/show
|
||||
|
||||
Change Pod Definitions
|
||||
----------------------
|
||||
## Change Pod Definitions
|
||||
|
||||
Edit both `show-rc.yaml` and `backend-rc.yaml` and replace the
|
||||
specified `image:` with the one that you built.
|
||||
|
||||
|
||||
@@ -2,24 +2,24 @@
|
||||
title: "Building"
|
||||
---
|
||||
|
||||
Building
|
||||
--------
|
||||
## Building
|
||||
|
||||
For each container, the build steps are the same. The examples below
|
||||
are for the `show` container. Replace `show` with `backend` for the
|
||||
backend container.
|
||||
|
||||
Google Container Registry ([GCR](https://cloud.google.com/tools/container-registry/))
|
||||
---
|
||||
## Google Container Registry ([GCR](https://cloud.google.com/tools/container-registry/))
|
||||
|
||||
docker build -t gcr.io/<project-name>/show .
|
||||
gcloud docker push gcr.io/<project-name>/show
|
||||
|
||||
Docker Hub
|
||||
----------
|
||||
## Docker Hub
|
||||
|
||||
docker build -t <username>/show .
|
||||
docker push <username>/show
|
||||
|
||||
Change Pod Definitions
|
||||
----------------------
|
||||
## Change Pod Definitions
|
||||
|
||||
Edit both `show-rc.yaml` and `backend-rc.yaml` and replace the
|
||||
specified `image:` with the one that you built.
|
||||
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
---
|
||||
title: "Environment Guide Example"
|
||||
---
|
||||
|
||||
Environment Guide Example
|
||||
=========================
|
||||
This example demonstrates running pods, replication controllers, and
|
||||
services. It shows two types of pods: frontend and backend, with
|
||||
services on top of both. Accessing the frontend pod will return
|
||||
@@ -15,29 +12,28 @@ is [here](/{{page.version}}/docs/user-guide/container-environment).
|
||||
|
||||

|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
## Prerequisites
|
||||
|
||||
This example assumes that you have a Kubernetes cluster installed and
|
||||
running, and that you have installed the `kubectl` command line tool
|
||||
somewhere in your path. Please see the [getting
|
||||
started](/{{page.version}}/docs/getting-started-guides/) for installation instructions
|
||||
for your platform.
|
||||
|
||||
Optional: Build your own containers
|
||||
-----------------------------------
|
||||
## Optional: Build your own containers
|
||||
|
||||
The code for the containers is under
|
||||
[containers/](containers/)
|
||||
|
||||
Get everything running
|
||||
----------------------
|
||||
## Get everything running
|
||||
|
||||
kubectl create -f ./backend-rc.yaml
|
||||
kubectl create -f ./backend-srv.yaml
|
||||
kubectl create -f ./show-rc.yaml
|
||||
kubectl create -f ./show-srv.yaml
|
||||
|
||||
Query the service
|
||||
-----------------
|
||||
## Query the service
|
||||
|
||||
Use `kubectl describe service show-srv` to determine the public IP of
|
||||
your service.
|
||||
|
||||
@@ -48,7 +44,8 @@ your service.
|
||||
Run `curl <public ip>:80` to query the service. You should get
|
||||
something like this back:
|
||||
|
||||
```
|
||||
```
|
||||
|
||||
Pod Name: show-rc-xxu6i
|
||||
Pod Namespace: default
|
||||
USER_VAR: important information
|
||||
@@ -67,7 +64,8 @@ Found backend ip: 10.147.252.185 port: 5000
|
||||
Response from backend
|
||||
Backend Container
|
||||
Backend Pod Name: backend-rc-6qiya
|
||||
Backend Pod Name: backend-rc-6qiya
|
||||
Backend Namespace: default
|
||||
|
||||
```
|
||||
|
||||
First the frontend pod's information is printed. The pod name and
|
||||
@@ -87,8 +85,8 @@ frontend pods are always contacting the backend through the backend
|
||||
service. This results in a different backend pod servicing each
|
||||
request as well.
|
||||
|
||||
request as well.
|
||||
|
||||
## Cleanup
|
||||
|
||||
kubectl delete rc,service -l type=show-type
|
||||
kubectl delete rc,service -l type=backend-type
|
||||
|
||||
|
||||
@@ -288,7 +288,4 @@ You can expose a Service in multiple ways that don't directly involve the Ingres
|
||||
* Use [Service.Type=LoadBalancer](https://github.com/kubernetes/kubernetes/blob/release-1.0/docs/user-guide/services.md#type-loadbalancer)
|
||||
* Use [Service.Type=NodePort](https://github.com/kubernetes/kubernetes/blob/release-1.0/docs/user-guide/services.md#type-nodeport)
|
||||
* Use a [Port Proxy] (https://github.com/kubernetes/contrib/tree/master/for-demos/proxy-to-service)
|
||||
* Deploy the [Service loadbalancer](https://github.com/kubernetes/contrib/tree/master/service-loadbalancer). This allows you to share a single IP among multiple Services and achieve more advanced loadbalancing through Service Annotations.
|
||||
|
||||
|
||||
|
||||
* Deploy the [Service loadbalancer](https://github.com/kubernetes/contrib/tree/master/service-loadbalancer). This allows you to share a single IP among multiple Services and achieve more advanced loadbalancing through Service Annotations.
|
||||
@@ -63,9 +63,4 @@ text | the plain text | kind is {.kind} | kind is List
|
||||
[start:end :step] | subscript operator | {.users[0].name}| myself
|
||||
[,] | union operator | {.items[*]['metadata.name', 'status.capacity']} | 127.0.0.1 127.0.0.2 map[cpu:4] map[cpu:8]
|
||||
?() | filter | {.users[?(@.name=="e2e")].user.password} | secret
|
||||
range, end | iterate list | {range .items[*]}[{.metadata.name}, {.status.capacity}] {end} | [127.0.0.1, map[cpu:4]] [127.0.0.2, map[cpu:8]]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
range, end | iterate list | {range .items[*]}[{.metadata.name}, {.status.capacity}] {end} | [127.0.0.1, map[cpu:4]] [127.0.0.2, map[cpu:8]]
|
||||
@@ -270,7 +270,4 @@ Use the following set of examples to help you familiarize yourself with running
|
||||
|
||||
## Next steps
|
||||
|
||||
Start using the [kubectl](kubectl/kubectl) commands.
|
||||
|
||||
|
||||
|
||||
Start using the [kubectl](kubectl/kubectl) commands.
|
||||
@@ -1,10 +1,6 @@
|
||||
---
|
||||
title: "Resource Quota"
|
||||
---
|
||||
|
||||
|
||||
Resource Quota
|
||||
========================================
|
||||
This page has been moved to [here](../../admin/resourcequota/README)
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
---
|
||||
title: "Resource Quota"
|
||||
---
|
||||
|
||||
|
||||
Resource Quota
|
||||
========================================
|
||||
This page has been moved to [here](../../admin/resourcequota/README)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user