Merge pull request #5903 from smarterclayton/support_resources_by_type_and_name

Allow resource.Builder commands to take arguments by type/name
This commit is contained in:
Clayton Coleman
2015-03-26 14:23:03 -04:00
16 changed files with 343 additions and 46 deletions

View File

@@ -17,7 +17,7 @@ Display one or many resources.
.PP
Possible resources include pods (po), replication controllers (rc), services
(se), minions (mi), or events (ev).
(svc), minions (mi), or events (ev).
.PP
By specifying the output as 'template' and providing a Go template as the value
@@ -169,18 +169,21 @@ of the \-\-template flag, you can filter the attributes of the fetched resource(
// List all pods in ps output format.
$ kubectl get pods
// List a single replication controller with specified ID in ps output format.
$ kubectl get replicationController 1234\-56\-7890\-234234\-456456
// List a single replication controller with specified NAME in ps output format.
$ kubectl get replicationController web
// List a single pod in JSON output format.
$ kubectl get \-o json pod 1234\-56\-7890\-234234\-456456
$ kubectl get \-o json pod web\-pod\-13je7
// Return only the status value of the specified pod.
$ kubectl get \-o template pod 1234\-56\-7890\-234234\-456456 \-\-template=\{\{.currentState.status\}\}
$ kubectl get \-o template web\-pod\-13je7 \-\-template=\{\{.currentState.status\}\}
// List all replication controllers and services together in ps output format.
$ kubectl get rc,services
// List one or more resources by their type and names
$ kubectl get rc/web service/frontend pods/web\-pod\-13je7
.fi
.RE