GoogleCloudPlatform/kubernetes — pull request #1417 by derekwaynecarr (2014-09-23 21:14:22+00:00)
Title: DO NOT MERGE: Namespace support (Part 2)

This PR builds on #1241 by adding the following:

1. Ability to set the current ns of an operation using kubecfg ns command
2. Modified client code to append ?namespace= to API requests as a stop-gap before taking on the larger path modification change.

How to use:

```
$ cluster/kubecfg.sh ns
$ Using namespace default
$ cluster/kubecfg.sh run openshift/hello-openshift 1 default-hi
$ cluster/kubecfg.sh list replicationControllers
see them in output
$ cluster/kubecfg.sh list pods
see them in output
$ cluster/kubecfg.sh ns other
$ cluster/kubecfg.sh list pods
should now see no pods in that namespace
$ cluster/kubecfg.sh list replicationControllers
should now see no pods in that namespace
$ cluster/kubecfg.sh ns default
$ cluster/kubecfg.sh list pods
original pods are now back
```

A future PR (once the v1beta3 stuff lands) will need to work out how to handle the new URL path structures instead of usage of a query parameter.