mirror of https://github.com/k3s-io/k3s
When api-server is not avaiable, kubectl cluster-info still prints information like: the cluster is running at ...
This patch fixes this bugpull/8/head
parent
a3d30dc939
commit
9407e2bb43
|
@ -92,8 +92,6 @@ func (o *ClusterInfoOptions) Complete(f cmdutil.Factory, cmd *cobra.Command) err
|
|||
}
|
||||
|
||||
func (o *ClusterInfoOptions) Run() error {
|
||||
printService(o.Out, "Kubernetes master", o.Client.Host)
|
||||
|
||||
// TODO use generalized labels once they are implemented (#341)
|
||||
b := o.Builder.
|
||||
WithScheme(legacyscheme.Scheme).
|
||||
|
@ -105,6 +103,8 @@ func (o *ClusterInfoOptions) Run() error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
printService(o.Out, "Kubernetes master", o.Client.Host)
|
||||
|
||||
services := r.Object.(*api.ServiceList).Items
|
||||
for _, service := range services {
|
||||
var link string
|
||||
|
|
Loading…
Reference in New Issue