Commit 8a911b39 authored by Matt T. Proud's avatar Matt T. Proud

Swap internal doc. refs to relative links.

This commit addresses issue #1571, which requests that all internal Kubernetes links are swapped to relative ones to better facilitate browsing of documentation on local forks, not to mention make the documentation have less needless boilerplate.
parent 119fc0eb
...@@ -21,7 +21,7 @@ Follow either of the two links above to access the appropriate CLA and instructi ...@@ -21,7 +21,7 @@ Follow either of the two links above to access the appropriate CLA and instructi
## Protocols for Collaborative Development ## Protocols for Collaborative Development
Please read [this doc](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/collab.md) for information on how we're running development for the project. Please read [this doc](docs/collab.md) for information on how we're running development for the project.
## Adding dependencies ## Adding dependencies
......
...@@ -52,7 +52,7 @@ While Docker itself works with individual containers, Kubernetes provides higher ...@@ -52,7 +52,7 @@ While Docker itself works with individual containers, Kubernetes provides higher
A _pod_ (as in a pod of whales or pea pod) is a relatively tightly coupled group of containers that are scheduled onto the same host. It models an application-specific "virtual host" in a containerized environment. Pods serve as units of scheduling, deployment, and horizontal scaling/replication, share fate, and share some resources, such as storage volumes and IP addresses. A _pod_ (as in a pod of whales or pea pod) is a relatively tightly coupled group of containers that are scheduled onto the same host. It models an application-specific "virtual host" in a containerized environment. Pods serve as units of scheduling, deployment, and horizontal scaling/replication, share fate, and share some resources, such as storage volumes and IP addresses.
[More details on pods](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/pods.md). [More details on pods](docs/pods.md).
### Labels ### Labels
...@@ -66,11 +66,11 @@ Kubernetes currently supports two objects that use label selectors to keep track ...@@ -66,11 +66,11 @@ Kubernetes currently supports two objects that use label selectors to keep track
- `service`: A service is a configuration unit for the [proxies](#kubernetes-proxy) that run on every worker node. It is named and points to one or more pods. - `service`: A service is a configuration unit for the [proxies](#kubernetes-proxy) that run on every worker node. It is named and points to one or more pods.
- `replicationController`: A replication controller takes a template and ensures that there is a specified number of "replicas" of that template running at any one time. If there are too many, it'll kill some. If there are too few, it'll start more. - `replicationController`: A replication controller takes a template and ensures that there is a specified number of "replicas" of that template running at any one time. If there are too many, it'll kill some. If there are too few, it'll start more.
The set of pods that a `service` targets is defined with a label selector. Similarly, the population of pods that a `replicationController` is monitoring is also defined with a label selector. The set of pods that a `service` targets is defined with a label selector. Similarly, the population of pods that a `replicationController` is monitoring is also defined with a label selector.
For management convenience and consistency, `services` and `replicationControllers` may themselves have labels and would generally carry the labels their corresponding pods have in common. For management convenience and consistency, `services` and `replicationControllers` may themselves have labels and would generally carry the labels their corresponding pods have in common.
[More details on labels](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/labels.md). [More details on labels](docs/labels.md).
## The Kubernetes Node ## The Kubernetes Node
...@@ -138,7 +138,7 @@ The heavy lifting of configuring the VMs is done by [SaltStack](http://www.salts ...@@ -138,7 +138,7 @@ The heavy lifting of configuring the VMs is done by [SaltStack](http://www.salts
The bootstrapping works like this: The bootstrapping works like this:
1. The `kube-up.sh` script uses the GCE [`startup-script`](https://developers.google.com/compute/docs/howtos/startupscript) mechanism for both the master node and the minion nodes. 1. The `kube-up.sh` script uses the GCE [`startup-script`](https://developers.google.com/compute/docs/howtos/startupscript) mechanism for both the master node and the minion nodes.
* For the minion, this simply configures and installs SaltStack. The network range that this minion is assigned is baked into the startup-script for that minion (see [the networking doc](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/networking.md) for more details). * For the minion, this simply configures and installs SaltStack. The network range that this minion is assigned is baked into the startup-script for that minion (see [the networking doc](docs/networking.md) for more details).
* For the master, the release files are downloaded from GCS and unpacked. Various parts (specifically the SaltStack configuration) are installed in the right places. * For the master, the release files are downloaded from GCS and unpacked. Various parts (specifically the SaltStack configuration) are installed in the right places.
2. SaltStack then installs the necessary servers on each node. 2. SaltStack then installs the necessary servers on each node.
* All go code is currently downloaded to each machine and compiled at install time. * All go code is currently downloaded to each machine and compiled at install time.
......
# Kubernetes # Kubernetes
Kubernetes is an open source implementation of container cluster management. Kubernetes is an open source implementation of container cluster management.
[Kubernetes Design Document](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/DESIGN.md) - [Kubernetes @ Google I/O 2014](http://youtu.be/tsk0pWf4ipw) [Kubernetes Design Document](DESIGN.md) - [Kubernetes @ Google I/O 2014](http://youtu.be/tsk0pWf4ipw)
[![GoDoc](https://godoc.org/github.com/GoogleCloudPlatform/kubernetes?status.png)](https://godoc.org/github.com/GoogleCloudPlatform/kubernetes) [![GoDoc](https://godoc.org/github.com/GoogleCloudPlatform/kubernetes?status.png)](https://godoc.org/github.com/GoogleCloudPlatform/kubernetes)
[![Travis](https://travis-ci.org/GoogleCloudPlatform/kubernetes.svg?branch=master)](https://travis-ci.org/GoogleCloudPlatform/kubernetes) [![Travis](https://travis-ci.org/GoogleCloudPlatform/kubernetes.svg?branch=master)](https://travis-ci.org/GoogleCloudPlatform/kubernetes)
...@@ -26,9 +26,9 @@ While the concepts and architecture in Kubernetes represent years of experience ...@@ -26,9 +26,9 @@ While the concepts and architecture in Kubernetes represent years of experience
* [Circle CI](https://circleci.com/docs/docker#google-compute-engine-and-kubernetes) * [Circle CI](https://circleci.com/docs/docker#google-compute-engine-and-kubernetes)
* [Digital Ocean](https://github.com/bketelsen/coreos-kubernetes-digitalocean) * [Digital Ocean](https://github.com/bketelsen/coreos-kubernetes-digitalocean)
* [OpenStack](https://developer.rackspace.com/blog/running-coreos-and-kubernetes/) * [OpenStack](https://developer.rackspace.com/blog/running-coreos-and-kubernetes/)
* [kubecfg command line tool](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/cli.md) * [kubecfg command line tool](docs/cli.md)
* [Kubernetes API Documentation](http://cdn.rawgit.com/GoogleCloudPlatform/kubernetes/31a0daae3627c91bc96e1f02a6344cd76e294791/api/kubernetes.html) * [Kubernetes API Documentation](http://cdn.rawgit.com/GoogleCloudPlatform/kubernetes/31a0daae3627c91bc96e1f02a6344cd76e294791/api/kubernetes.html)
* [Kubernetes Client Libraries](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/client-libraries.md) * [Kubernetes Client Libraries](docs/client-libraries.md)
* [Discussion and Community Support](#community-discussion-and-support) * [Discussion and Community Support](#community-discussion-and-support)
* [Hacking on Kubernetes](#development) * [Hacking on Kubernetes](#development)
* [Hacking on Kubernetes Salt configuration](docs/salt.md) * [Hacking on Kubernetes Salt configuration](docs/salt.md)
...@@ -38,8 +38,8 @@ While the concepts and architecture in Kubernetes represent years of experience ...@@ -38,8 +38,8 @@ While the concepts and architecture in Kubernetes represent years of experience
Check out examples of Kubernetes in action, and community projects in the larger ecosystem: Check out examples of Kubernetes in action, and community projects in the larger ecosystem:
* [Detailed example application](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/examples/guestbook/README.md) * [Detailed example application](examples/guestbook/README.md)
* [Example of dynamic updates](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/examples/update-demo/README.md) * [Example of dynamic updates](examples/update-demo/README.md)
* [Cluster monitoring with heapster and cAdvisor](https://github.com/GoogleCloudPlatform/heapster) * [Cluster monitoring with heapster and cAdvisor](https://github.com/GoogleCloudPlatform/heapster)
* [Community projects](https://github.com/GoogleCloudPlatform/kubernetes/wiki/Kubernetes-Community) * [Community projects](https://github.com/GoogleCloudPlatform/kubernetes/wiki/Kubernetes-Community)
...@@ -178,7 +178,7 @@ hack/e2e-test.sh 1 1 1 ...@@ -178,7 +178,7 @@ hack/e2e-test.sh 1 1 1
``` ```
### Testing out flaky tests ### Testing out flaky tests
[Instructions here](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/flaky-tests.md) [Instructions here](docs/flaky-tests.md)
### Add/Update dependencies ### Add/Update dependencies
......
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
# Kubernetes Container Environment # Kubernetes Container Environment
## Overview ## Overview
This document describes the environment for Kubelet managed containers on a Kubernetes node (kNode).  In contrast to the Kubernetes cluster API, which provides an API for creating and managing containers, the Kubernetes container environment provides the container access to information about what else is going on in the cluster.  This document describes the environment for Kubelet managed containers on a Kubernetes node (kNode).  In contrast to the Kubernetes cluster API, which provides an API for creating and managing containers, the Kubernetes container environment provides the container access to information about what else is going on in the cluster. 
This cluster information makes it possible to build applications that are *cluster aware*.   This cluster information makes it possible to build applications that are *cluster aware*.  
Additionally, the Kubernetes container environment defines a series of signals that are surfaced to optional signal handlers defined as part of individual containers.  Container signals are somewhat analagous to operating system signals in a traditional process model.   However these signals are designed to make it easier to build reliable, scalable cloud applications in the Kubernetes cluster.  Containers that participate in this cluster lifecycle become *cluster native* Additionally, the Kubernetes container environment defines a series of signals that are surfaced to optional signal handlers defined as part of individual containers.  Container signals are somewhat analagous to operating system signals in a traditional process model.   However these signals are designed to make it easier to build reliable, scalable cloud applications in the Kubernetes cluster.  Containers that participate in this cluster lifecycle become *cluster native*
Another important part of the container environment is the file system that is available to the container. In Kubernetes, the filesystem is a combination of the Docker image and pod volumes. The design and usage of pod volumes is described in its own [document](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/volumes.md) Another important part of the container environment is the file system that is available to the container. In Kubernetes, the filesystem is a combination of the Docker image and pod volumes. The design and usage of pod volumes is described in its own [document](docs/volumes.md)
The following sections describe both the cluster information provided to containers, as well as the signals and life-cycle that allows containers to interact with the management system. The following sections describe both the cluster information provided to containers, as well as the signals and life-cycle that allows containers to interact with the management system.
...@@ -44,7 +44,7 @@ There are currently two container signals that are surfaced to containers, and t ...@@ -44,7 +44,7 @@ There are currently two container signals that are surfaced to containers, and t
This signal is sent immediately before a container is created.  It signals that the container will be created immediately after the call completes.  No parameters are passed. *Note - *Some event handlers (namely ‘exec’ are incompatible with this event) This signal is sent immediately before a container is created.  It signals that the container will be created immediately after the call completes.  No parameters are passed. *Note - *Some event handlers (namely ‘exec’ are incompatible with this event)
*PostStart* *PostStart*
This signal is sent immediately after a container is created.  It signals to the container that it has been created.  No parameters are passed to the handler. This signal is sent immediately after a container is created.  It signals to the container that it has been created.  No parameters are passed to the handler.
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
## Model and motivation ## Model and motivation
Kubernetes deviates from the default Docker networking model. The goal is for each [pod](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/pods.md) to have an IP in a flat shared networking namespace that has full communication with other physical computers and containers across the network. IP-per-pod creates a clean, backward-compatible model where pods can be treated much like VMs or physical hosts from the perspectives of port allocation, networking, naming, service discovery, load balancing, application configuration, and migration. Kubernetes deviates from the default Docker networking model. The goal is for each [pod](docs/pods.md) to have an IP in a flat shared networking namespace that has full communication with other physical computers and containers across the network. IP-per-pod creates a clean, backward-compatible model where pods can be treated much like VMs or physical hosts from the perspectives of port allocation, networking, naming, service discovery, load balancing, application configuration, and migration.
OTOH, dynamic port allocation requires supporting both static ports (e.g., for externally accessible services) and dynamically allocated ports, requires partitioning centrally allocated and locally acquired dynamic ports, complicates scheduling (since ports are a scarce resource), is inconvenient for users, complicates application configuration, is plagued by port conflicts and reuse and exhaustion, requires non-standard approaches to naming (e.g., etcd rather than DNS), requires proxies and/or redirection for programs using standard naming/addressing mechanisms (e.g., web browsers), requires watching and cache invalidation for address/port changes for instances in addition to watching group membership changes, and obstructs container/pod migration (e.g., using CRIU). NAT introduces additional complexity by fragmenting the addressing space, which breaks self-registration mechanisms, among other problems. OTOH, dynamic port allocation requires supporting both static ports (e.g., for externally accessible services) and dynamically allocated ports, requires partitioning centrally allocated and locally acquired dynamic ports, complicates scheduling (since ports are a scarce resource), is inconvenient for users, complicates application configuration, is plagued by port conflicts and reuse and exhaustion, requires non-standard approaches to naming (e.g., etcd rather than DNS), requires proxies and/or redirection for programs using standard naming/addressing mechanisms (e.g., web browsers), requires watching and cache invalidation for address/port changes for instances in addition to watching group membership changes, and obstructs container/pod migration (e.g., using CRIU). NAT introduces additional complexity by fragmenting the addressing space, which breaks self-registration mechanisms, among other problems.
...@@ -27,7 +27,7 @@ Ports mapped in from the 'main IP' (and hence the internet if the right firewall ...@@ -27,7 +27,7 @@ Ports mapped in from the 'main IP' (and hence the internet if the right firewall
We start Docker with: We start Docker with:
DOCKER_OPTS="--bridge cbr0 --iptables=false" DOCKER_OPTS="--bridge cbr0 --iptables=false"
We set up this bridge on each node with SaltStack, in [container_bridge.py](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/cluster/saltbase/salt/_states/container_bridge.py). We set up this bridge on each node with SaltStack, in [container_bridge.py](cluster/saltbase/salt/_states/container_bridge.py).
cbr0: cbr0:
container_bridge.ensure: container_bridge.ensure:
...@@ -65,7 +65,7 @@ Docker allocates IP addresses from a bridge we create on each node, using its †...@@ -65,7 +65,7 @@ Docker allocates IP addresses from a bridge we create on each node, using its â€
### Other networking implementation examples ### Other networking implementation examples
With the primary aim of providing IP-per-pod-model, other implementations exist to serve the purpose outside of GCE. With the primary aim of providing IP-per-pod-model, other implementations exist to serve the purpose outside of GCE.
- [OpenVSwitch with GRE/VxLAN](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/ovs-networking.md) - [OpenVSwitch with GRE/VxLAN](docs/ovs-networking.md)
- [Flannel](https://github.com/coreos/flannel#flannel) - [Flannel](https://github.com/coreos/flannel#flannel)
## Challenges and future work ## Challenges and future work
...@@ -105,4 +105,3 @@ Another approach could be to create a new host interface alias for each pod, if ...@@ -105,4 +105,3 @@ Another approach could be to create a new host interface alias for each pod, if
### IPv6 ### IPv6
IPv6 would be a nice option, also, but we can't depend on it yet. Docker support is in progress: [Docker issue #2974](https://github.com/dotcloud/docker/issues/2974), [Docker issue #6923](https://github.com/dotcloud/docker/issues/6923), [Docker issue #6975](https://github.com/dotcloud/docker/issues/6975). Additionally, direct ipv6 assignment to instances doesn't appear to be supported by major cloud providers (e.g., AWS EC2, GCE) yet. We'd happily take pull requests from people running Kubernetes on bare metal, though. :-) IPv6 would be a nice option, also, but we can't depend on it yet. Docker support is in progress: [Docker issue #2974](https://github.com/dotcloud/docker/issues/2974), [Docker issue #6923](https://github.com/dotcloud/docker/issues/6923), [Docker issue #6975](https://github.com/dotcloud/docker/issues/6975). Additionally, direct ipv6 assignment to instances doesn't appear to be supported by major cloud providers (e.g., AWS EC2, GCE) yet. We'd happily take pull requests from people running Kubernetes on bare metal, though. :-)
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
## What is a _pod_? ## What is a _pod_?
A _pod_ (as in a pod of whales or pea pod) models an application-specific "logical host" in a containerized environment. It may contain one or more containers which are relatively tightly coupled -- in a pre-container world, they would have executed on the same physical or virtual host. A _pod_ (as in a pod of whales or pea pod) models an application-specific "logical host" in a containerized environment. It may contain one or more containers which are relatively tightly coupled -- in a pre-container world, they would have executed on the same physical or virtual host.
Like running containers, pods are considered to be relatively ephemeral rather than durable entities. As discussed in [life of a pod](pod-states.md), pods are scheduled to nodes and remain there until termination (according to restart policy) or deletion. When a node dies, the pods scheduled to that node are deleted. Specific pods are never rescheduled to new nodes; instead, they must be replaced (see [replication controller](replication-controller.md) for more details). (In the future, a higher-level API may support pod migration.) Like running containers, pods are considered to be relatively ephemeral rather than durable entities. As discussed in [life of a pod](pod-states.md), pods are scheduled to nodes and remain there until termination (according to restart policy) or deletion. When a node dies, the pods scheduled to that node are deleted. Specific pods are never rescheduled to new nodes; instead, they must be replaced (see [replication controller](replication-controller.md) for more details). (In the future, a higher-level API may support pod migration.)
...@@ -10,9 +10,9 @@ Like running containers, pods are considered to be relatively ephemeral rather t ...@@ -10,9 +10,9 @@ Like running containers, pods are considered to be relatively ephemeral rather t
### Resource sharing and communication ### Resource sharing and communication
Pods facilitate data sharing and communication among their constituents. Pods facilitate data sharing and communication among their constituents.
The containers in the pod all use the same network namespace/IP and port space, and can find and communicate with each other using localhost. Each pod has an IP address in a flat shared networking namespace that has full communication with other physical computers and containers across the network. The hostname is set to the pod's Name for the containers within the pod. [More details on networking](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/networking.md). The containers in the pod all use the same network namespace/IP and port space, and can find and communicate with each other using localhost. Each pod has an IP address in a flat shared networking namespace that has full communication with other physical computers and containers across the network. The hostname is set to the pod's Name for the containers within the pod. [More details on networking](docs/networking.md).
In addition to defining the containers that run in the pod, the pod specifies a set of shared storage volumes. Volumes enable data to survive container restarts and to be shared among the containers within the pod. In addition to defining the containers that run in the pod, the pod specifies a set of shared storage volumes. Volumes enable data to survive container restarts and to be shared among the containers within the pod.
......
...@@ -24,7 +24,7 @@ The Kubernetes user interface is a query-based visualization of the Kubernetes A ...@@ -24,7 +24,7 @@ The Kubernetes user interface is a query-based visualization of the Kubernetes A
_GroupBy_ takes a label ```key``` as a parameter, places all objects with the same value for that key within a single group. For example ```/groups/host/selector``` groups pods by host. ```/groups/name/selector``` groups pods by name. Groups are hiearchical, for example ```/groups/name/host/selector``` first groups by pod name, and then by host. _GroupBy_ takes a label ```key``` as a parameter, places all objects with the same value for that key within a single group. For example ```/groups/host/selector``` groups pods by host. ```/groups/name/selector``` groups pods by name. Groups are hiearchical, for example ```/groups/name/host/selector``` first groups by pod name, and then by host.
#### Select #### Select
Select takes a [label selector](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/labels.md) and uses it to filter, so only resources which match that label selector are displayed. For example, ```/groups/host/selector/name=frontend```, shows pods, grouped by host, which have a label with the name `frontend`. Select takes a [label selector](docs/labels.md) and uses it to filter, so only resources which match that label selector are displayed. For example, ```/groups/host/selector/name=frontend```, shows pods, grouped by host, which have a label with the name `frontend`.
## Rebuilding the UX ## Rebuilding the UX
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
## Pods ## Pods
The first atom of Kubernetes is a _pod_. A pod is a collection of containers that are symbiotically group. The first atom of Kubernetes is a _pod_. A pod is a collection of containers that are symbiotically group.
See [pods](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/pods.md) for more details. See [pods](docs/pods.md) for more details.
### Intro ### Intro
...@@ -23,7 +23,7 @@ desiredState: ...@@ -23,7 +23,7 @@ desiredState:
A pod definition is a declaration of a _desired state_. Desired state is a really important part of Kubernetes. Many things present a desired state to the system, and it is Kubernetes' responsibility to make sure that the current state matches the desired state. For example, when you create a Pod, you declare that you want the containers in it to be running. If the containers happen to not be running (program failure, ...), Kubernetes will continue to (re)create them for you until you delete the Pod. A pod definition is a declaration of a _desired state_. Desired state is a really important part of Kubernetes. Many things present a desired state to the system, and it is Kubernetes' responsibility to make sure that the current state matches the desired state. For example, when you create a Pod, you declare that you want the containers in it to be running. If the containers happen to not be running (program failure, ...), Kubernetes will continue to (re)create them for you until you delete the Pod.
See the [design document](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/DESIGN.md) for more details. See the [design document](DESIGN.md) for more details.
### Volumes ### Volumes
...@@ -75,7 +75,7 @@ In Kubernetes, ```emptyDir``` Volumes live for the lifespan of the Pod, which is ...@@ -75,7 +75,7 @@ In Kubernetes, ```emptyDir``` Volumes live for the lifespan of the Pod, which is
If you want to mount a directory that already exists in the file system (e.g. ```/var/logs```) you can use the ```hostDir``` directive. If you want to mount a directory that already exists in the file system (e.g. ```/var/logs```) you can use the ```hostDir``` directive.
See [volumes](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/docs/volumes.md) for more details. See [volumes](docs/volumes.md) for more details.
### Multiple Containers ### Multiple Containers
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment