Syntax highlighting

This commit is contained in:
John Mulhausen
2016-02-16 17:53:42 -08:00
parent bbeb111863
commit ee72211075
115 changed files with 1922 additions and 1919 deletions
+8 -8
View File
@@ -31,14 +31,14 @@ for namespaces](/{{page.version}}/docs/admin/namespaces)
You can list the current namespaces in a cluster using:
{% highlight console %}
```shell
$ kubectl get namespaces
NAME LABELS STATUS
default <none> Active
kube-system <none> Active
{% endhighlight %}
```
Kubernetes starts with two initial namespaces:
* `default` The default namespace for objects with no other namespace
@@ -50,12 +50,12 @@ To temporarily set the namespace for a request, use the `--namespace` flag.
For example:
{% highlight console %}
```shell
$ kubectl --namespace=<insert-namespace-name-here> run nginx --image=nginx
$ kubectl --namespace=<insert-namespace-name-here> get pods
{% endhighlight %}
```
### Setting the namespace preference
@@ -64,19 +64,19 @@ context.
First get your current context:
{% highlight console %}
```shell
$ export CONTEXT=$(kubectl config view | grep current-context | awk '{print $2}')
{% endhighlight %}
```
Then update the default namespace:
{% highlight console %}
```shell
$ kubectl config set-context $(CONTEXT) --namespace=<insert-namespace-name-here>
{% endhighlight %}
```
## Namespaces and DNS