mirror of https://github.com/k3s-io/k3s
Merge pull request #11405 from mikedanese/namespace-example-move
move kubernetes-namespaces to docs/user-guidepull/6/head
commit
55e9356bf3
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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.
|
||||
|
@ -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 -->
|
|
@ -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{},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue