resolving conflicts

This commit is contained in:
Savitha Raghunathan
2020-06-16 17:08:15 -04:00
1497 changed files with 24525 additions and 14364 deletions
@@ -3,19 +3,20 @@ reviewers:
- derekwaynecarr
- janetkuo
title: Share a Cluster with Namespaces
content_template: templates/task
content_type: task
---
{{% capture overview %}}
<!-- overview -->
This page shows how to view, work in, and delete {{< glossary_tooltip text="namespaces" term_id="namespace" >}}. The page also shows how to use Kubernetes namespaces to subdivide your cluster.
{{% /capture %}}
{{% capture prerequisites %}}
## {{% heading "prerequisites" %}}
* Have an [existing Kubernetes cluster](/docs/setup/).
* Have a basic understanding of Kubernetes _[Pods](/docs/concepts/workloads/pods/pod/)_, _[Services](/docs/concepts/services-networking/service/)_, and _[Deployments](/docs/concepts/workloads/controllers/deployment/)_.
{{% /capture %}}
{{% capture steps %}}
<!-- steps -->
## Viewing namespaces
@@ -201,7 +202,7 @@ This delete is asynchronous, so for a time you will see the namespace in the `Te
snowflake 2/2 2 2 2m
```
```shell
kubectl get pods -l run=snowflake -n=development
kubectl get pods -l app=snowflake -n=development
```
```
NAME READY STATUS RESTARTS AGE
@@ -223,7 +224,8 @@ This delete is asynchronous, so for a time you will see the namespace in the `Te
Production likes to run cattle, so let's create some cattle pods.
```shell
kubectl run cattle --image=k8s.gcr.io/serve_hostname --replicas=5 -n=production
kubectl create deployment cattle --image=k8s.gcr.io/serve_hostname -n=production
kubectl scale deployment cattle --replicas=5 -n=production
kubectl get deployment -n=production
```
@@ -233,7 +235,7 @@ This delete is asynchronous, so for a time you will see the namespace in the `Te
```
```shell
kubectl get pods -l run=cattle -n=production
kubectl get pods -l app=cattle -n=production
```
```
NAME READY STATUS RESTARTS AGE
@@ -249,9 +251,9 @@ At this point, it should be clear that the resources users create in one namespa
As the policy support in Kubernetes evolves, we will extend this scenario to show how you can provide different
authorization rules for each namespace.
{{% /capture %}}
{{% capture discussion %}}
<!-- discussion -->
## Understanding the motivation for using namespaces
@@ -301,12 +303,13 @@ is local to a namespace. This is useful for using the same configuration across
multiple namespaces such as Development, Staging and Production. If you want to reach
across namespaces, you need to use the fully qualified domain name (FQDN).
{{% /capture %}}
{{% capture whatsnext %}}
## {{% heading "whatsnext" %}}
* Learn more about [setting the namespace preference](/docs/concepts/overview/working-with-objects/namespaces/#setting-the-namespace-preference).
* Learn more about [setting the namespace for a request](/docs/concepts/overview/working-with-objects/namespaces/#setting-the-namespace-for-a-request)
* See [namespaces design](https://github.com/kubernetes/community/blob/{{< param "githubbranch" >}}/contributors/design-proposals/architecture/namespaces.md).
{{% /capture %}}