Skip to content

Commit

Permalink
Merge pull request kubernetes#11405 from mikedanese/namespace-example…
Browse files Browse the repository at this point in the history
…-move

move kubernetes-namespaces to docs/user-guide
  • Loading branch information
bgrant0607 committed Jul 17, 2015
2 parents 3686345 + ee7498e commit 55e9356
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
2 changes: 2 additions & 0 deletions docs/user-guide/namespaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ The Namespace provides a unique scope for:

## Usage

Look [here](namespaces/) for an in depth example of namespaces.

### Viewing namespaces
You can list the current namespaces in a cluster using:
```sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ certainly want the docs that go with that version.</h1>
<!-- END MUNGE: UNVERSIONED_WARNING -->
## Kubernetes Namespaces

Kubernetes _[namespaces](../../docs/user-guide/namespaces.md)_ help different projects, teams, or customers to share a Kubernetes cluster.
Kubernetes _[namespaces](../namespaces.md)_ help different projects, teams, or customers to share a Kubernetes cluster.

It does this by providing the following:

1. A scope for [Names](../../docs/user-guide/identifiers.md).
1. A scope for [Names](../identifiers.md).
2. A mechanism to attach authorization and policy to a subsection of the cluster.

Use of multiple namespaces is optional.
Expand All @@ -37,8 +37,8 @@ This example demonstrates how to use Kubernetes namespaces to subdivide your clu

This example assumes the following:

1. You have an [existing Kubernetes cluster](../../docs/getting-started-guides/).
2. You have a basic understanding of Kubernetes _[pods](../../docs/user-guide/pods.md)_, _[services](../../docs/user-guide/services.md)_, and _[replication controllers](../../docs/user-guide/replication-controller.md)_.
1. You have an [existing Kubernetes cluster](../../getting-started-guides/).
2. You have a basic understanding of Kubernetes _[pods](../pods.md)_, _[services](../services.md)_, and _[replication controllers](../replication-controller.md)_.

### Step One: Understand the default namespace

Expand Down Expand Up @@ -70,7 +70,7 @@ One pattern this organization could follow is to partition the Kubernetes cluste

Let's create two new namespaces to hold our work.

Use the file [`examples/kubernetes-namespaces/namespace-dev.json`](namespace-dev.json) which describes a development namespace:
Use the file [`namespace-dev.json`](namespace-dev.json) which describes a development namespace:

```js
{
Expand All @@ -88,13 +88,13 @@ Use the file [`examples/kubernetes-namespaces/namespace-dev.json`](namespace-dev
Create the development namespace using kubectl.

```shell
$ kubectl create -f examples/kubernetes-namespaces/namespace-dev.json
$ kubectl create -f docs/user-guide/kubernetes-namespaces/namespace-dev.json
```

And then lets create the production namespace using kubectl.

```shell
$ kubectl create -f examples/kubernetes-namespaces/namespace-prod.json
$ kubectl create -f docs/user-guide/kubernetes-namespaces/namespace-prod.json
```

To be sure things are right, let's list all of the namespaces in our cluster.
Expand Down Expand Up @@ -265,5 +265,5 @@ authorization rules for each namespace.


<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/examples/kubernetes-namespaces/README.md?pixel)]()
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/namespaces/README.md?pixel)]()
<!-- END MUNGE: GENERATED_ANALYTICS -->
2 changes: 1 addition & 1 deletion examples/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ func TestExampleObjectSchemas(t *testing.T) {
"hazelcast-controller": &api.ReplicationController{},
"hazelcast-service": &api.Service{},
},
"../examples/kubernetes-namespaces": {
"../docs/user-guide/namespaces": {
"namespace-dev": &api.Namespace{},
"namespace-prod": &api.Namespace{},
},
Expand Down

0 comments on commit 55e9356

Please sign in to comment.