mirror of https://github.com/k3s-io/k3s
Merge pull request #1137 from derekwaynecarr/name_vs_id_fixup
Fixup name vs ID terminologypull/6/head
commit
42eea82461
|
@ -52,7 +52,7 @@ cluster/kubecfg.sh list pods
|
|||
You'll see a single redis master pod. It will also display the machine that the pod is running on once it gets placed (may take up to thirty seconds).
|
||||
|
||||
```
|
||||
Name Image(s) Host Labels
|
||||
ID Image(s) Host Labels
|
||||
---------- ---------- ---------- ----------
|
||||
redis-master-2 dockerfile/redis kubernetes-minion-3.c.briandpe-api.internal name=redis-master
|
||||
```
|
||||
|
@ -91,7 +91,7 @@ to create the service with the `kubecfg` cli:
|
|||
|
||||
```shell
|
||||
$ cluster/kubecfg.sh -c examples/guestbook/redis-master-service.json create services
|
||||
Name Labels Selector Port
|
||||
ID Labels Selector Port
|
||||
---------- ---------- ---------- ----------
|
||||
redismaster name=redis-master 10000
|
||||
```
|
||||
|
@ -135,7 +135,7 @@ to create the replication controller by running:
|
|||
|
||||
```shell
|
||||
$ cluster/kubecfg.sh -c examples/guestbook/redis-slave-controller.json create replicationControllers
|
||||
Name Image(s) Selector Replicas
|
||||
ID Image(s) Selector Replicas
|
||||
---------- ---------- ---------- ----------
|
||||
redisSlaveController brendanburns/redis-slave name=redisslave 2
|
||||
```
|
||||
|
@ -150,7 +150,7 @@ Once that's up you can list the pods in the cluster, to verify that the master a
|
|||
|
||||
```shell
|
||||
$ cluster/kubecfg.sh list pods
|
||||
Name Image(s) Host Labels
|
||||
ID Image(s) Host Labels
|
||||
---------- ---------- ---------- ----------
|
||||
redis-master-2 dockerfile/redis kubernetes-minion-3.c.briandpe-api.internal name=redis-master
|
||||
4d65822107fcfd52 brendanburns/redis-slave kubernetes-minion-3.c.briandpe-api.internal name=redisslave,replicationController=redisSlaveController
|
||||
|
@ -184,7 +184,7 @@ Now that you have created the service specification, create it in your cluster w
|
|||
|
||||
```shell
|
||||
$ cluster/kubecfg.sh -c examples/guestbook/redis-slave-service.json create services
|
||||
Name Labels Selector Port
|
||||
ID Labels Selector Port
|
||||
---------- ---------- ---------- ----------
|
||||
redisslave name=redisslave name=redisslave 10001
|
||||
```
|
||||
|
@ -225,7 +225,7 @@ Using this file, you can turn up your frontend with:
|
|||
|
||||
```shell
|
||||
$ cluster/kubecfg.sh -c examples/guestbook/frontend-controller.json create replicationControllers
|
||||
Name Image(s) Selector Replicas
|
||||
ID Image(s) Selector Replicas
|
||||
---------- ---------- ---------- ----------
|
||||
frontendController brendanburns/php-redis name=frontend 3
|
||||
```
|
||||
|
@ -234,7 +234,7 @@ Once that's up (it may take ten to thirty seconds to create the pods) you can li
|
|||
|
||||
```shell
|
||||
$ cluster/kubecfg.sh list pods
|
||||
Name Image(s) Host Labels
|
||||
ID Image(s) Host Labels
|
||||
---------- ---------- ---------- ----------
|
||||
redis-master-2 dockerfile/redis kubernetes-minion-3.c.briandpe-api.internal name=redis-master
|
||||
4d65822107fcfd52 brendanburns/redis-slave kubernetes-minion-3.c.briandpe-api.internal name=redisslave,replicationController=redisSlaveController
|
||||
|
|
|
@ -47,8 +47,8 @@ type Interface interface {
|
|||
// PodInterface has methods to work with Pod resources.
|
||||
type PodInterface interface {
|
||||
ListPods(selector labels.Selector) (api.PodList, error)
|
||||
GetPod(name string) (api.Pod, error)
|
||||
DeletePod(name string) error
|
||||
GetPod(id string) (api.Pod, error)
|
||||
DeletePod(id string) error
|
||||
CreatePod(api.Pod) (api.Pod, error)
|
||||
UpdatePod(api.Pod) (api.Pod, error)
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ type PodInterface interface {
|
|||
// ReplicationControllerInterface has methods to work with ReplicationController resources.
|
||||
type ReplicationControllerInterface interface {
|
||||
ListReplicationControllers(selector labels.Selector) (api.ReplicationControllerList, error)
|
||||
GetReplicationController(name string) (api.ReplicationController, error)
|
||||
GetReplicationController(id string) (api.ReplicationController, error)
|
||||
CreateReplicationController(api.ReplicationController) (api.ReplicationController, error)
|
||||
UpdateReplicationController(api.ReplicationController) (api.ReplicationController, error)
|
||||
DeleteReplicationController(string) error
|
||||
|
@ -65,7 +65,7 @@ type ReplicationControllerInterface interface {
|
|||
|
||||
// ServiceInterface has methods to work with Service resources.
|
||||
type ServiceInterface interface {
|
||||
GetService(name string) (api.Service, error)
|
||||
GetService(id string) (api.Service, error)
|
||||
CreateService(api.Service) (api.Service, error)
|
||||
UpdateService(api.Service) (api.Service, error)
|
||||
DeleteService(string) error
|
||||
|
@ -247,15 +247,15 @@ func (c *Client) ListPods(selector labels.Selector) (result api.PodList, err err
|
|||
return
|
||||
}
|
||||
|
||||
// GetPod takes the name of the pod, and returns the corresponding Pod object, and an error if it occurs.
|
||||
func (c *Client) GetPod(name string) (result api.Pod, err error) {
|
||||
err = c.Get().Path("pods").Path(name).Do().Into(&result)
|
||||
// GetPod takes the id of the pod, and returns the corresponding Pod object, and an error if it occurs
|
||||
func (c *Client) GetPod(id string) (result api.Pod, err error) {
|
||||
err = c.Get().Path("pods").Path(id).Do().Into(&result)
|
||||
return
|
||||
}
|
||||
|
||||
// DeletePod takes the name of the pod, and returns an error if one occurs.
|
||||
func (c *Client) DeletePod(name string) error {
|
||||
return c.Delete().Path("pods").Path(name).Do().Error()
|
||||
// DeletePod takes the id of the pod, and returns an error if one occurs
|
||||
func (c *Client) DeletePod(id string) error {
|
||||
return c.Delete().Path("pods").Path(id).Do().Error()
|
||||
}
|
||||
|
||||
// CreatePod takes the representation of a pod. Returns the server's representation of the pod, and an error, if it occurs.
|
||||
|
@ -281,8 +281,8 @@ func (c *Client) ListReplicationControllers(selector labels.Selector) (result ap
|
|||
}
|
||||
|
||||
// GetReplicationController returns information about a particular replication controller.
|
||||
func (c *Client) GetReplicationController(name string) (result api.ReplicationController, err error) {
|
||||
err = c.Get().Path("replicationControllers").Path(name).Do().Into(&result)
|
||||
func (c *Client) GetReplicationController(id string) (result api.ReplicationController, err error) {
|
||||
err = c.Get().Path("replicationControllers").Path(id).Do().Into(&result)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -303,8 +303,8 @@ func (c *Client) UpdateReplicationController(controller api.ReplicationControlle
|
|||
}
|
||||
|
||||
// DeleteReplicationController deletes an existing replication controller.
|
||||
func (c *Client) DeleteReplicationController(name string) error {
|
||||
return c.Delete().Path("replicationControllers").Path(name).Do().Error()
|
||||
func (c *Client) DeleteReplicationController(id string) error {
|
||||
return c.Delete().Path("replicationControllers").Path(id).Do().Error()
|
||||
}
|
||||
|
||||
// WatchReplicationControllers returns a watch.Interface that watches the requested controllers.
|
||||
|
@ -324,8 +324,8 @@ func (c *Client) ListServices(selector labels.Selector) (list api.ServiceList, e
|
|||
}
|
||||
|
||||
// GetService returns information about a particular service.
|
||||
func (c *Client) GetService(name string) (result api.Service, err error) {
|
||||
err = c.Get().Path("services").Path(name).Do().Into(&result)
|
||||
func (c *Client) GetService(id string) (result api.Service, err error) {
|
||||
err = c.Get().Path("services").Path(id).Do().Into(&result)
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -346,8 +346,8 @@ func (c *Client) UpdateService(svc api.Service) (result api.Service, err error)
|
|||
}
|
||||
|
||||
// DeleteService deletes an existing service.
|
||||
func (c *Client) DeleteService(name string) error {
|
||||
return c.Delete().Path("services").Path(name).Do().Error()
|
||||
func (c *Client) DeleteService(id string) error {
|
||||
return c.Delete().Path("services").Path(id).Do().Error()
|
||||
}
|
||||
|
||||
// WatchServices returns a watch.Interface that watches the requested services.
|
||||
|
|
|
@ -137,9 +137,9 @@ func (h *HumanReadablePrinter) validatePrintHandlerFunc(printFunc reflect.Value)
|
|||
return nil
|
||||
}
|
||||
|
||||
var podColumns = []string{"Name", "Image(s)", "Host", "Labels"}
|
||||
var replicationControllerColumns = []string{"Name", "Image(s)", "Selector", "Replicas"}
|
||||
var serviceColumns = []string{"Name", "Labels", "Selector", "Port"}
|
||||
var podColumns = []string{"ID", "Image(s)", "Host", "Labels"}
|
||||
var replicationControllerColumns = []string{"ID", "Image(s)", "Selector", "Replicas"}
|
||||
var serviceColumns = []string{"ID", "Labels", "Selector", "Port"}
|
||||
var minionColumns = []string{"Minion identifier"}
|
||||
var statusColumns = []string{"Status"}
|
||||
|
||||
|
|
Loading…
Reference in New Issue