From 8d9a2571881afc0ab71d0e40a4e8821218d9c3f5 Mon Sep 17 00:00:00 2001 From: Satnam Singh Date: Sun, 19 Jul 2015 01:01:37 +0100 Subject: [PATCH] Fix console output formatting for namespaces doc --- docs/user-guide/namespaces.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/user-guide/namespaces.md b/docs/user-guide/namespaces.md index 75029e2fdc0..9acc14e5679 100644 --- a/docs/user-guide/namespaces.md +++ b/docs/user-guide/namespaces.md @@ -77,8 +77,8 @@ Look [here](namespaces/) for an in depth example of namespaces. You can list the current namespaces in a cluster using: -```sh -$> kubectl get namespaces +```console +$ kubectl get namespaces NAME LABELS STATUS default Active kube-system Active @@ -90,14 +90,14 @@ Kubernetes starts with two initial namespaces: You can also get the summary of a specific namespace using: -``` -kubectl get namespaces +```console +$ kubectl get namespaces ``` Or you can get detailed information with: -```sh -$> kubectl describe namespaces +```console +$ kubectl describe namespaces Name: default Labels: Status: Active @@ -143,8 +143,8 @@ More information on the ```finalizers``` field can be found in the namespace [de Then run: -``` -kubectl create -f ./my-namespace.yaml +```console +$ kubectl create -f ./my-namespace.yaml ``` ### Setting the namespace for a request @@ -153,9 +153,9 @@ To temporarily set the namespace for a request, use the ```--namespace``` flag. For example: -``` -kubectl --namespace= run nginx --image=nginx -kubectl --namespace= get pods +```console +$ kubectl --namespace= run nginx --image=nginx +$ kubectl --namespace= get pods ``` ### Setting the namespace preference @@ -165,22 +165,22 @@ context. First get your current context: -```sh -export CONTEXT=$(kubectl config view | grep current-context | awk '{print $2}') +```console +$ export CONTEXT=$(kubectl config view | grep current-context | awk '{print $2}') ``` Then update the default namespace: -```sh -kubectl config set-context $(CONTEXT) --namespace= +```console +$ kubectl config set-context $(CONTEXT) --namespace= ``` ### Deleting a namespace You can delete a namespace with -``` -kubectl delete namespaces +```console +$ kubectl delete namespaces ``` **WARNING, this deletes _everything_ under the namespace!**