Browse code

Fixes examples of oc proxy

Fabiano Franz authored on 2016/06/23 03:11:04
Showing 2 changed files
... ...
@@ -1700,12 +1700,16 @@ Run a proxy to the Kubernetes API server
1700 1700
 
1701 1701
 [options="nowrap"]
1702 1702
 ----
1703
-  # Run a proxy to kubernetes apiserver on port 8011, serving static content from ./local/www/
1703
+  # Run a proxy to the api server on port 8011, serving static content from ./local/www/
1704 1704
   oc proxy --port=8011 --www=./local/www/
1705 1705
 
1706
-  # Run a proxy to kubernetes apiserver, changing the api prefix to k8s-api
1707
-  # This makes e.g. the pods api available at localhost:8011/k8s-api/v1beta3/pods/
1708
-  oc proxy --api-prefix=k8s-api
1706
+  # Run a proxy to the api server on an arbitrary local port.
1707
+  # The chosen port for the server will be output to stdout.
1708
+  oc proxy --port=0
1709
+
1710
+  # Run a proxy to the api server, changing the api prefix to my-api
1711
+  # This makes e.g. the pods api available at localhost:8011/my-api/api/v1/pods/
1712
+  oc proxy --api-prefix=/my-api
1709 1713
 ----
1710 1714
 ====
1711 1715
 
... ...
@@ -268,14 +268,18 @@ func NewCmdDescribe(fullName string, f *clientcmd.Factory, out io.Writer) *cobra
268 268
 }
269 269
 
270 270
 const (
271
-	proxyLong = `Run a proxy to the Kubernetes API server`
271
+	proxyLong = `Run a proxy to the API server`
272 272
 
273
-	proxyExample = `  # Run a proxy to kubernetes apiserver on port 8011, serving static content from ./local/www/
273
+	proxyExample = `  # Run a proxy to the api server on port 8011, serving static content from ./local/www/
274 274
   %[1]s proxy --port=8011 --www=./local/www/
275 275
 
276
-  # Run a proxy to kubernetes apiserver, changing the api prefix to k8s-api
277
-  # This makes e.g. the pods api available at localhost:8011/k8s-api/v1beta3/pods/
278
-  %[1]s proxy --api-prefix=k8s-api`
276
+  # Run a proxy to the api server on an arbitrary local port.
277
+  # The chosen port for the server will be output to stdout.
278
+  %[1]s proxy --port=0
279
+
280
+  # Run a proxy to the api server, changing the api prefix to my-api
281
+  # This makes e.g. the pods api available at localhost:8011/my-api/api/v1/pods/
282
+  %[1]s proxy --api-prefix=/my-api`
279 283
 )
280 284
 
281 285
 // NewCmdProxy is a wrapper for the Kubernetes cli proxy command